From 3efc28a4f139defe493a375f861a65d80abafc40 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Fri, 8 May 2020 18:46:52 -0300 Subject: [PATCH] fix(admin-settings-form): fix setting default values on data dont overwrite data values --- src/components/js/EcAdminSettingsForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/js/EcAdminSettingsForm.js b/src/components/js/EcAdminSettingsForm.js index 3bd9965..e62b113 100644 --- a/src/components/js/EcAdminSettingsForm.js +++ b/src/components/js/EcAdminSettingsForm.js @@ -135,8 +135,8 @@ export default { component }) } - if (localSchema.default) { - data[field] = localSchema.default + if (!data[field] && localSchema.default) { + this.$set(data, field, localSchema.default) } if (localSchema.type === 'object') { if (!data[field]) {