Merge pull request #12 from syt2/11-更新时报错-typeerror-tiscollection-is-not-a-function

fix isCollection func
This commit is contained in:
syt 2024-07-25 16:53:31 +08:00 committed by GitHub
commit ed129f2a45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}),
);
}

View File

@ -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;
}