Skip to content

Commit

Permalink
Added a check for when the variable applies to all levels and a speci…
Browse files Browse the repository at this point in the history
…fic category
  • Loading branch information
Bluestonex63 committed Jun 1, 2024
1 parent e6fb95f commit 1e29047
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ let varc = (vari, lvls, cats, masterdiv) => {
try {
return lvls.find(level => level.id == variable.scope.level).id == lvlsel.value
} catch {}
} else if (variable.scope.type == "all-level" && variable.category != null) {
try {
return cats.find(cat => variable.category == cat.id).id == catselv
} catch {}
} else {
try {
return variable.scope.type == "all-levels" || variable.scope.type == "global"
Expand Down

0 comments on commit 1e29047

Please sign in to comment.