diff --git a/src/realm-settings/NewAttributeSettings.tsx b/src/realm-settings/NewAttributeSettings.tsx index 9167dfd737..2703327249 100644 --- a/src/realm-settings/NewAttributeSettings.tsx +++ b/src/realm-settings/NewAttributeSettings.tsx @@ -129,9 +129,10 @@ export default function NewAttributeSettings() { selector, required, ...values - } = config.attributes!.find( - (attribute) => attribute.name === attributeName - )!; + } = + config.attributes!.find( + (attribute) => attribute.name === attributeName + ) || {}; convertToFormValues(values, form.setValue); Object.entries( flatten({ permissions, selector, required }, { safe: true })