Skip to content

Commit

Permalink
Prefer using the arg delegate for enum args if its provided over the … (
Browse files Browse the repository at this point in the history
#1579)

Prefer using the arg delegate for enum args if its provided over the command dictionary values
  • Loading branch information
cohansen authored Dec 20, 2024
1 parent a9d1030 commit e9a346c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/sequencing/form/EnumEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
let value: string;
$: value = initVal;
$: enumValues = commandDictionary?.enumMap[argDef.enum_name]?.values?.map(v => v.symbol) ?? argDef.range ?? [];
$: enumValues = argDef.range ?? commandDictionary?.enumMap[argDef.enum_name]?.values?.map(v => v.symbol) ?? [];
$: isValueInEnum = !!enumValues.find(ev => ev === value);
$: setInEditor(value);
$: options = enumValues.map(ev => ({
Expand Down

0 comments on commit e9a346c

Please sign in to comment.