mirror of
https://github.com/zadam/trilium.git
synced 2026-02-26 16:43:36 +01:00
chore(launch_bar): log warnings instead of crashing on a bad launcher
This commit is contained in:
parent
82cae8ffbf
commit
6b4da33729
@ -67,7 +67,7 @@ function Launcher({ note, isHorizontalLayout }: { note: FNote, isHorizontalLayou
|
||||
case "builtinWidget":
|
||||
return initBuiltinWidget(note, isHorizontalLayout);
|
||||
default:
|
||||
throw new Error(`Unrecognized launcher type '${launcherType}' for launcher '${note.noteId}' title '${note.title}'`);
|
||||
console.warn(`Unrecognized launcher type '${launcherType}' for launcher '${note.noteId}' title '${note.title}'`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ function initBuiltinWidget(note: FNote, isHorizontalLayout: boolean) {
|
||||
case "mobileTabSwitcher":
|
||||
return <TabSwitcher />;
|
||||
default:
|
||||
throw new Error(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`);
|
||||
console.warn(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user