Skip to content

Commit

Permalink
fix(admin-settings-form): preset data field value with default
Browse files Browse the repository at this point in the history
fixes #98
  • Loading branch information
leomp12 committed May 7, 2020
1 parent 6cfca44 commit ab2f389
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/js/EcAdminSettingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ export default {
component
})
}
if (localSchema.default) {
data[field] = localSchema.default
}
if (localSchema.type === 'object') {
if (!data[field]) {
this.$set(data, field, {})
Expand Down

0 comments on commit ab2f389

Please # to comment.