fix: avoid null values in field layout while saving
This commit is contained in:
parent
366508fb23
commit
92fcfcebce
@ -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,
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user