Skip to content

Build your personal knowledge base with Trilium Notes

fallback to display empty tab if the requested note doesn't exist anymore

zadamc4669cbaa385
diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js
index 3c0d91dcc7..be198d30fd 100644
--- a/src/public/javascripts/services/note_detail.js
+++ b/src/public/javascripts/services/note_detail.js
@@ -232,6 +232,12 @@ async function loadNoteDetail(origNotePath, options = {}) {
if (!notePath) {
console.error(`Cannot resolve note path ${origNotePath}`);
+
+ // fallback to display something
+ if (tabContexts.length === 0) {
+ await openEmptyTab();
+ }
+
return;
}