Skip to content

Commit 5d4068c

Browse files
committed
fix type
1 parent d241625 commit 5d4068c

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

apps/roam/src/components/AdvancedNodeSearchDialog/dockedSearchSidebarStorage.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ export const isRightSidebarOpen = (): boolean => {
2929
};
3030

3131
export const getRoamSidebarWindows = async (): Promise<RoamSidebarWindow[]> => {
32-
const rightSidebar = window.roamAlphaAPI.ui.rightSidebar as {
33-
getWindows?: () => Promise<RoamSidebarWindow[]>;
34-
};
35-
if (!rightSidebar.getWindows) return [];
36-
37-
try {
38-
return (await rightSidebar.getWindows()) ?? [];
39-
} catch {
40-
return [];
41-
}
32+
return window.roamAlphaAPI.ui.rightSidebar.getWindows() ?? [];
4233
};
4334

4435
const normalizeRegistryEntry = (

0 commit comments

Comments
 (0)