From e9ae08d725374a3b36efd65a828fcc99639b812f Mon Sep 17 00:00:00 2001 From: makearmy Date: Mon, 29 Sep 2025 00:06:39 -0400 Subject: [PATCH] submit 'type' fixes --- app/components/forms/SettingsSubmit.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/components/forms/SettingsSubmit.tsx b/app/components/forms/SettingsSubmit.tsx index e28832fd..9846012d 100644 --- a/app/components/forms/SettingsSubmit.tsx +++ b/app/components/forms/SettingsSubmit.tsx @@ -33,6 +33,7 @@ function useOptions(path: string) { const m = String(v).match(/(\d+(\.\d+)?)/); return m ? Number(m[1]) : null; }; + const nmRangeFor = (target?: string | null): [number, number] | null => { if (!target) return null; const t = target.toLowerCase(); @@ -107,7 +108,6 @@ function useOptions(path: string) { }); }; } - } else if (rawPath === "repeater-choices") { // target=, group=, field= const group = params.get("group") || ""; @@ -131,9 +131,7 @@ function useOptions(path: string) { // Choices can live on child.options.choices or child.meta.options.choices const choices: any[] = - (child?.options?.choices as any[]) ?? - (child?.meta?.options?.choices as any[]) ?? - []; + (child?.options?.choices as any[]) ?? (child?.meta?.options?.choices as any[]) ?? []; const mapped: Opt[] = choices.map((c: any) => ({ id: String(c.value ?? c.key ?? c.id), @@ -147,12 +145,6 @@ function useOptions(path: string) { setLoading(false); } return; // short-circuit - } else { - // unknown path → empty - setOpts([]); - setLoading(false); - return; - } else { // unknown path → empty setOpts([]);