refactor(react/dialogs): solve client errors

This commit is contained in:
Elian Doran
2025-08-10 13:02:17 +03:00
parent da1f18c60f
commit d3519b3059
6 changed files with 17 additions and 13 deletions

View File

@@ -52,7 +52,11 @@ function JumpToNoteDialogComponent() {
setIsCommandMode(text.startsWith(">"));
}, [ text ]);
async function onItemSelected(suggestion: Suggestion) {
async function onItemSelected(suggestion?: Suggestion | null) {
if (!suggestion) {
return;
}
setShown(false);
if (suggestion.notePath) {
appContext.tabManager.getActiveContext()?.setNote(suggestion.notePath);