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 b6a202f54f
commit 48c3b3a58d
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>