fix: cannot open empty note as tab

This commit is contained in:
windingwind 2024-07-26 10:24:54 +08:00
parent fcd9d0288c
commit 7f25b6f4b2

View File

@ -20,7 +20,7 @@ export async function openWorkspaceTab(
return currentTab.id;
}
// @ts-ignore fix uncaught error when called during startup
await waitUtilAsync(() => item._noteTitle);
await waitUtilAsync(() => typeof item._noteTitle === "string");
const { id, container } = Zotero_Tabs.add({
type: TAB_TYPE,
title: item.getNoteTitle(),