From 3868b64c030a2bbc64e3ed24cf9b819b8cb1853f Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Sun, 9 Jun 2024 22:21:07 +0800 Subject: [PATCH] fix: trigger other actions early return fix: #333 --- src/utils/actions.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/actions.ts b/src/utils/actions.ts index cf24bab..fd18812 100644 --- a/src/utils/actions.ts +++ b/src/utils/actions.ts @@ -196,7 +196,12 @@ 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) { + if ( + ![ActionOperationTypes.script, ActionOperationTypes.triggerAction].includes( + action.operation, + ) && + !item + ) { return false; } const tags = action.data