Skip to content

Commit

Permalink
add: condition support
Browse files Browse the repository at this point in the history
  • Loading branch information
Polygononon committed Nov 19, 2022
1 parent f4d67d0 commit f5d566b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export default {
isCondition = item.hasTag(_tag)
}
}
if (operation === "add" && !item.hasTag(tags[i])) {
if (operation === "add" && !item.hasTag(tags[i]) && isCondition) {
item.addTag(tags[i], userTag ? 0 : 1);
updateCount += 1;
} else if (operation === "remove" && item.hasTag(tags[i])) {
} else if (operation === "remove" && item.hasTag(tags[i]) && isCondition) {
item.removeTag(tags[i]);
updateCount += 1;
} else if (operation === "change") {
Expand Down

0 comments on commit f5d566b

Please sign in to comment.