fix: update type

This commit is contained in:
JimmFly
2022-12-13 18:21:11 +08:00
parent 41d96471e8
commit 17ad8d4e21
3 changed files with 12 additions and 7 deletions
@@ -22,5 +22,5 @@ export type EditorHandlers = {
unFavoritePage: (pageId: string) => void;
toggleFavoritePage: (pageId: string) => void;
permanentlyDeletePage: (pageId: string) => void;
search: (query: QueryContent) => Map<string, string>;
search: (query: QueryContent) => Map<string, string | undefined>;
};
@@ -50,9 +50,7 @@ export const useEditorHandler = (workspace?: Workspace): EditorHandlers => {
}
},
search: (query: QueryContent) => {
if (query) {
return workspace!.search(query);
}
return workspace!.search(query);
},
};
};