mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 12:08:03 +08:00
fallback to display empty tab if the requested note doesn't exist anymore
This commit is contained in:
parent
74b41c9911
commit
c4669cbaa3
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue