From 9f391ed2d92e27ab6edb55f2bd984227bfb1f11c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 26 Sep 2023 10:26:12 +0200 Subject: [PATCH] Fix initial load empty --- .../client/src/components/app/forms/RelationshipField.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte index d054a4a558..768f784d49 100644 --- a/packages/client/src/components/app/forms/RelationshipField.svelte +++ b/packages/client/src/components/app/forms/RelationshipField.svelte @@ -59,7 +59,7 @@ // Persist the initial values as options, allowing them to be present in the dropdown, // even if they are not in the inital fetch results initialValuesProcessed = true - optionsObj = fieldState?.value?.reduce((accumulator, value) => { + optionsObj = (fieldState?.value || []).reduce((accumulator, value) => { accumulator[value._id] = { _id: value._id, [primaryDisplay]: value.primaryDisplay,