Close an open toast before opening a new one

This commit is contained in:
Oliver Hamlet
2016-04-29 08:25:16 +01:00
parent d4543f9942
commit 3ca5b9192e
+4 -2
View File
@@ -44,8 +44,10 @@
static showNotification(text) {
const toast = document.getElementById('toast');
toast.text = text;
toast.show();
if (toast.opened) {
toast.hide();
}
toast.show(text);
}
};
}));