From abec600bb6385e1f0425adde9615ee5f5a943996 Mon Sep 17 00:00:00 2001 From: makearmy Date: Sun, 28 Sep 2025 23:57:51 -0400 Subject: [PATCH] submit 'type' fixes --- app/components/forms/SettingsSubmit.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/components/forms/SettingsSubmit.tsx b/app/components/forms/SettingsSubmit.tsx index cfaf94f4..12b7aac3 100644 --- a/app/components/forms/SettingsSubmit.tsx +++ b/app/components/forms/SettingsSubmit.tsx @@ -107,13 +107,14 @@ function useOptions(path: string) { }); }; } + } else if (rawPath === "repeater-choices") { // target=, group=, field= const group = params.get("group") || ""; const field = params.get("field") || ""; const collection = params.get("target") || ""; - // Call our server proxy so it can use the server token + // Use server proxy so it can auth with server token const proxyUrl = `/api/directus/fields?collection=${encodeURIComponent(collection)}`; const metaRes = await fetch(proxyUrl, { cache: "no-store" }); if (!metaRes.ok) throw new Error(`Proxy ${metaRes.status} fetching ${proxyUrl}`); @@ -146,8 +147,14 @@ function useOptions(path: string) { setLoading(false); } return; // short-circuit + } else { + // unknown path → empty + setOpts([]); + setLoading(false); + return; } + } else { // unknown path → empty setOpts([]);