diff --git a/frontend/src/components/SectionFields.vue b/frontend/src/components/SectionFields.vue index 240b4ed5..82b1867f 100644 --- a/frontend/src/components/SectionFields.vue +++ b/frontend/src/components/SectionFields.vue @@ -141,7 +141,7 @@ const data = defineModel() const _fields = computed(() => { let all_fields = [] props.fields?.forEach((field) => { - let df = field.all_properties + let df = field?.all_properties if (df?.depends_on) evaluate_depends_on(df.depends_on, field) all_fields.push({ ...field, diff --git a/frontend/src/components/Settings/SidePanelModal.vue b/frontend/src/components/Settings/SidePanelModal.vue index a35c7408..a661305b 100644 --- a/frontend/src/components/Settings/SidePanelModal.vue +++ b/frontend/src/components/Settings/SidePanelModal.vue @@ -133,9 +133,9 @@ function saveChanges() { let _sections = JSON.parse(JSON.stringify(sections.data)) _sections.forEach((section) => { if (!section.fields) return - section.fields = section.fields.map( - (field) => field.fieldname || field.name, - ) + section.fields = section.fields + .map((field) => field.name || field.fieldname) + .filter(Boolean) }) loading.value = true call(