Skip to content

Build your personal knowledge base with Trilium Notes

fix(client): delete modal crashing

Elian Doran456336673262
diff --git a/src/public/app/services/utils.ts b/src/public/app/services/utils.ts
index c1d591d324..13539a6352 100644
--- a/src/public/app/services/utils.ts
+++ b/src/public/app/services/utils.ts
@@ -206,7 +206,7 @@ function closeActiveDialog() {
if (glob.activeDialog) {
// TODO: Fix once we use proper ES imports.
//@ts-ignore
- Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
+ bootstrap.Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
glob.activeDialog = null;
}
}
@@ -252,7 +252,7 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
saveFocusedElement();
// TODO: Fix once we use proper ES imports.
//@ts-ignore
- Modal.getOrCreateInstance($dialog[0]).show();
+ bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
$dialog.on('hidden.bs.modal', () => {
$(".aa-input").autocomplete("close");