From 2a9125aa99f2aeb3e5fce17ef44aca74a1f98933 Mon Sep 17 00:00:00 2001 From: ytshen Date: Thu, 25 Jul 2024 16:52:52 +0800 Subject: [PATCH] fix isCollection func --- src/hooks.ts | 2 +- src/modules/tldrFetcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks.ts b/src/hooks.ts index fc88cf9..764b07f 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -99,7 +99,7 @@ function onLoad() { for (const lib of Zotero.Libraries.getAll()) { needFetchItems = needFetchItems.concat( (await Zotero.Items.getAll(lib.id)).filter((item: Zotero.Item) => { - return item.isRegularItem() && !item.isCollection(); + return item.isRegularItem(); }), ); } diff --git a/src/modules/tldrFetcher.ts b/src/modules/tldrFetcher.ts index f47d44a..b165f81 100644 --- a/src/modules/tldrFetcher.ts +++ b/src/modules/tldrFetcher.ts @@ -13,7 +13,7 @@ export class TLDRFetcher { constructor(item: Zotero.Item) { this.zoteroItem = item; - if (item.isRegularItem() && !item.isCollection()) { + if (item.isRegularItem()) { this.title = item.getField("title") as string; this.abstract = item.getField("abstractNote") as string; }