From 2402ad11ed7c5326c2fbf864c7f9f189e5d0d07b Mon Sep 17 00:00:00 2001 From: bordun Date: Tue, 31 Mar 2020 09:52:39 +0200 Subject: [PATCH] notification: safe removal --- src/client/ui/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/ui/notifications.js b/src/client/ui/notifications.js index 22a106a6..2a5f329a 100644 --- a/src/client/ui/notifications.js +++ b/src/client/ui/notifications.js @@ -46,7 +46,7 @@ class Toast { this.html.classList.add('remove') setTimeout(()=>{ - el.removeChild(this.html) + if (el.contains(this.html)) el.removeChild(this.html) }, 200) }