1
0
Fork 0
mirror of synced 2024-09-30 00:57:16 +13:00

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

View file

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