Closed 454116278 closed 6 months ago
const now = new Date();
if(!item) return ${now} 空条目出现
;
I have debugged the codes, find out the dispatchActionByKey is called twice. // await addon.api.actionManager.dispatchActionByKey(key, { // itemIDs, // collectionID: collection?.id, // triggerType: "menu", // }); // Trigger action for each item for (const itemID of itemIDs) { await addon.api.actionManager.dispatchActionByKey(key, { itemID, collectionID: collection?.id, triggerType: "menu", }); }
Is there an existing issue for this?
Are you using the latest Zotero and the latest plugin?
Environment
Describe the bug
see the code from line 195 in actions.ts.
async function applyAction(action: ActionData, args: ActionArgs) { const item = (Zotero.Items.get(args.itemID || -1) as Zotero.Item | false) || null; // If the item is not found and the operation is not script, early return. if (action.operation !== ActionOperationTypes.script && !item) { return false; }
// if operation == script and item == null ,here dont return false. // please check it is right or not.
Debug Output
I always get item == null in my script.
Anything else?
No response