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.
2 parents 106df53 + ecea94a commit 133b74aCopy full SHA for 133b74a
src/components/Notification.js
@@ -116,7 +116,7 @@ class Notification extends React.Component {
116
n.onshow = (e) => {
117
this.props.onShow(e, opt.tag);
118
setTimeout(() => {
119
- this.close(opt.tag);
+ this.close(n);
120
}, this.props.timeout);
121
};
122
n.onclick = (e) => {this.props.onClick(e, opt.tag); };
@@ -134,9 +134,9 @@ class Notification extends React.Component {
134
);
135
}
136
137
- close(tag) {
138
- if (this.notifications[tag] && typeof this.notifications[tag].close === 'function') {
139
- this.notifications[tag].close();
+ close(n) {
+ if (n && typeof n.close === 'function') {
+ n.close();
140
141
142
0 commit comments