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

This commit is contained in:
zadam 2019-06-01 20:32:11 +02:00
parent 74b41c9911
commit c4669cbaa3

View file

@ -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;
}