From a7517252c1e7491d3b1c640e23e99cf3ae7b633c Mon Sep 17 00:00:00 2001 From: Chirag Chhatrala <60499540+chiragchhatrala@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:19:33 +0530 Subject: [PATCH] Object.hasOwn & hasOwnProperty replace with lodash has (#367) * Object.hasOwn & hasOwnProperty replace with lodash has * fix _has --- client/components/forms/useFormInput.js | 3 ++- client/components/global/Badge.vue | 3 ++- client/components/global/Modal.vue | 9 +++++---- client/components/open/forms/OpenCompleteForm.vue | 3 ++- client/components/open/forms/OpenFormField.vue | 3 ++- .../open/forms/components/FormUrlPrefill.vue | 3 ++- .../form-components/FormEditorPreview.vue | 3 ++- .../components/form-components/FormInformation.vue | 4 ++-- .../form-logic-components/FormBlockLogicEditor.vue | 5 +++-- .../open/forms/fields/components/FieldOptions.vue | 3 ++- client/components/open/tables/OpenTable.vue | 14 +++++++++----- client/components/vendor/FeatureBase.vue | 3 ++- client/mixins/forms/input.js | 3 ++- 13 files changed, 37 insertions(+), 22 deletions(-) diff --git a/client/components/forms/useFormInput.js b/client/components/forms/useFormInput.js index 28959a82..fda9689f 100644 --- a/client/components/forms/useFormInput.js +++ b/client/components/forms/useFormInput.js @@ -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(() => { diff --git a/client/components/global/Badge.vue b/client/components/global/Badge.vue index 102292f8..2b39cc78 100644 --- a/client/components/global/Badge.vue +++ b/client/components/global/Badge.vue @@ -7,6 +7,7 @@