From e9a346c81a5f857dcb30549d50c9e8dcc9c78a3c Mon Sep 17 00:00:00 2001 From: Cody Hansen Date: Fri, 20 Dec 2024 09:22:02 -1000 Subject: [PATCH] =?UTF-8?q?Prefer=20using=20the=20arg=20delegate=20for=20e?= =?UTF-8?q?num=20args=20if=20its=20provided=20over=20the=20=E2=80=A6=20(#1?= =?UTF-8?q?579)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prefer using the arg delegate for enum args if its provided over the command dictionary values --- src/components/sequencing/form/EnumEditor.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/sequencing/form/EnumEditor.svelte b/src/components/sequencing/form/EnumEditor.svelte index 49cbce0a79..b237f7bcbf 100644 --- a/src/components/sequencing/form/EnumEditor.svelte +++ b/src/components/sequencing/form/EnumEditor.svelte @@ -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 => ({