diff --git a/package.json b/package.json index dadb4d2..bf9e678 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenfrog", - "version": "0.14.01", + "version": "0.14.02", "description": "Zotero plugin for update journal information from easyScholar", "config": { "addonName": "Green Frog", diff --git a/src/hooks.ts b/src/hooks.ts index 5e919ec..6b4808c 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -129,7 +129,7 @@ async function onNotify( if (regularItems.length !== 0) { // await KeyExampleFactory.setExtra(regularItems); - BasicExampleFactory.exampleNotifierCallback(ids) + BasicExampleFactory.exampleNotifierCallback(regularItems) return; } //Zotero.debug(`添加条目了${ids}!`) diff --git a/src/modules/examples.ts b/src/modules/examples.ts index a1c4f51..e35c26c 100644 --- a/src/modules/examples.ts +++ b/src/modules/examples.ts @@ -62,14 +62,14 @@ export class BasicExampleFactory { } @example - static async exampleNotifierCallback(ids: any) { + static async exampleNotifierCallback(regularItems: any) { // 增加条目时 新增条目时 // Zotero.Items.get(ids).filter(item => item.isRegularItem()) - var items = Zotero.Items.get(ids); + // var items = Zotero.Items.get(ids); // 增加条目时 更新 var addUpdate = Zotero.Prefs.get(`extensions.zotero.${config.addonRef}.add.update`, true); if (addUpdate) { - await KeyExampleFactory.setExtra(items); + await KeyExampleFactory.setExtra(regularItems); } // 得到添加的条目总数 // var items = Zotero.Items.get(ids);