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

@@ -2,6 +2,7 @@ import { ref, computed, watch } from 'vue'
import { themes } from '~/lib/forms/form-themes.js'
import {default as _get} from 'lodash/get'
import {default as _set} from 'lodash/set'
import { default as _has } from 'lodash/has'
export const inputProps = {
id: { type: String, default: null },
@@ -31,7 +32,7 @@ export function useFormInput (props, context, formPrefixKey = null) {
})
const hasValidation = computed(() => {
return props.form !== null && props.form !== undefined && props.form.hasOwnProperty('errors')
return props.form !== null && props.form !== undefined && _has(props.form, 'errors')
})
const hasError = computed(() => {