Skip to content

Commit

Permalink
fix: trigger other actions early return
Browse files Browse the repository at this point in the history
fix: #333
  • Loading branch information
windingwind committed Jun 9, 2024
1 parent f9af93e commit 3868b64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3868b64

Please sign in to comment.