Object.hasOwn & hasOwnProperty replace with lodash has (#367)

* Object.hasOwn & hasOwnProperty replace with lodash has

* fix _has
This commit is contained in:
Chirag Chhatrala
2024-04-03 15:19:33 +05:30
committed by GitHub
parent 615ac88f89
commit a7517252c1
13 changed files with 37 additions and 22 deletions

View File

@@ -316,6 +316,7 @@ import timezones from '~/data/timezones.json'
import countryCodes from '~/data/country_codes.json'
import CountryFlag from 'vue-country-flag-next'
import FormBlockLogicEditor from '../../components/form-logic-components/FormBlockLogicEditor.vue'
import { default as _has } from 'lodash/has'
export default {
name: 'FieldOptions',
@@ -556,7 +557,7 @@ export default {
}
if (this.field.type in defaultFieldValues) {
Object.keys(defaultFieldValues[this.field.type]).forEach(key => {
if (!Object.hasOwn(this.field,key)) {
if (!_has(this.field,key)) {
this.field[key] = defaultFieldValues[this.field.type][key]
}
})