Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

Commit

Permalink
Release version 5.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Burtchaell committed Jun 26, 2016
1 parent ca4e261 commit 53a53ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-notification",
"version": "5.0.5",
"version": "5.0.6",
"description": "Snackbar style notification component for React.",
"main": "dist/index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class Notification extends Component {
if (!nextProps.hasOwnProperty('isLast'))
clearTimeout(this.dismissTimeout);
if (nextProps.onDismiss && nextProps.isActive && !this.props.isActive) {
this.dismissTimeout = setTimeout(nextProps.onDismiss, nextProps.dismissAfter);
this.dismissTimeout = setTimeout(
nextProps.onDismiss,
nextProps.dismissAfter
);
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('<Notification />', () => {
onDismiss={handleDismiss}
/>
);

expect(handleDismiss.calledOnce).to.equal(false);
wrapper.setProps({ isActive: true });
setTimeout(() => {
Expand All @@ -149,7 +149,7 @@ describe('<Notification />', () => {
onDismiss={handleDismiss}
/>
);

wrapper.setProps({ isActive: true });
setTimeout(() => {
try {
Expand Down
6 changes: 3 additions & 3 deletions test/notificationStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('<NotificationStack />', () => {
onDismiss={handleDismiss}
/>
);

wrapper.update();
setTimeout(() => {
try {
Expand All @@ -42,7 +42,7 @@ describe('<NotificationStack />', () => {
onDismiss={handleDismiss}
/>
);

wrapper.update();
setTimeout(() => {
try {
Expand All @@ -51,7 +51,7 @@ describe('<NotificationStack />', () => {
} catch (e) {
done(e);
}
// Add transition time + 1000ms per each Notification
// Add transition time + 1000ms per each Notification
}, mockNotification.dismissAfter + 1340);
});

Expand Down

0 comments on commit 53a53ee

Please sign in to comment.