Ensure schema provided by DataProvider has name properties for all fields

This commit is contained in:
Andrew Kingston 2021-03-25 08:14:53 +00:00
parent 7c79e52360
commit 0a50c7bf86
1 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,13 @@
} else { } else {
schema = {} schema = {}
} }
// Ensure all schema fields have a name property
Object.entries(schema).forEach(([key, value]) => {
if (!value.name) {
value.name = key
}
})
} }
</script> </script>