From 904eb25f64d2b4d4153dfbbde7c1280cf5fbfc71 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 29 Oct 2019 18:59:56 +0100 Subject: [PATCH] fix persistent toasts lingering after disposal in DOM --- src/public/javascripts/services/toast.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/javascripts/services/toast.js b/src/public/javascripts/services/toast.js index 224e6f5cd..c2b658c2a 100644 --- a/src/public/javascripts/services/toast.js +++ b/src/public/javascripts/services/toast.js @@ -45,12 +45,12 @@ function showPersistent(options) { } if (options.closeAfter) { - setTimeout(() => $toast.toast('dispose'), options.closeAfter); + setTimeout(() => $toast.remove(), options.closeAfter); } } function closePersistent(id) { - $("#toast-" + id).toast("dispose"); + $("#toast-" + id).remove(); } function showMessage(message, delay = 2000) {