Skip to content

Commit

Permalink
fix: guard for removed options in reduceSelect
Browse files Browse the repository at this point in the history
Fixes #384
  • Loading branch information
arildm committed Aug 28, 2024
1 parent 3537684 commit 91fc009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scripts/directives/reduce-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ angular.module("korpApp").directive("reduceSelect", [
scope.hasStructAttrs = scope.items.some((item) => item.group == "sentence_attr")

for (const name of scope.selected || []) {
scope.keyItems[name].selected = true
if (name in scope.keyItems) scope.keyItems[name].selected = true
}
for (const name of scope.insensitive || []) {
scope.keyItems[name].insensitive = true
if (name in scope.keyItems) scope.keyItems[name].insensitive = true
}

// If no selection given, default to selecting the word option
Expand Down

0 comments on commit 91fc009

Please sign in to comment.