Skip to content

Build your personal knowledge base with Trilium Notes

fix persistent toasts lingering after disposal in DOM

zadam904eb25f64d2
diff --git a/src/public/javascripts/services/toast.js b/src/public/javascripts/services/toast.js
index 224e6f5cd6..c2b658c2a4 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) {