Skip to content

Commit c9f2662

Browse files
committed
fix: remove notification from state before calling onRemove
1 parent 7731449 commit c9f2662

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/NotificationSystem.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ var NotificationSystem = React.createClass({
7070
return toCheck.uid !== uid;
7171
});
7272

73-
if (notification && notification.onRemove) {
74-
notification.onRemove(notification);
75-
}
76-
7773
if (this._isMounted) {
7874
this.setState({ notifications: notifications });
7975
}
76+
77+
if (notification && notification.onRemove) {
78+
notification.onRemove(notification);
79+
}
8080
},
8181

8282
getInitialState: function() {

0 commit comments

Comments
 (0)