We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7ea1d5 commit ecea94aCopy full SHA for ecea94a
src/components/Notification.js
@@ -118,7 +118,7 @@ class Notification extends React.Component {
118
n.onshow = (e) => {
119
this.props.onShow(e, opt.tag);
120
setTimeout(() => {
121
- this.close(opt.tag);
+ this.close(n);
122
}, this.props.timeout);
123
};
124
n.onclick = (e) => {this.props.onClick(e, opt.tag); };
@@ -136,9 +136,9 @@ class Notification extends React.Component {
136
);
137
}
138
139
- close(tag) {
140
- if (this.notifications[tag] && typeof this.notifications[tag].close === 'function') {
141
- this.notifications[tag].close();
+ close(n) {
+ if (n && typeof n.close === 'function') {
+ n.close();
142
143
144
0 commit comments