From 7a823282f9d48e51bc5c56e9ed6799700084ae79 Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Mon, 2 May 2022 10:31:09 +0200 Subject: [PATCH] Fix null modelValue --- front/src/components/common/AttachmentInput.vue | 2 +- front/src/init/directives.ts | 3 +-- front/src/main.ts | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/front/src/components/common/AttachmentInput.vue b/front/src/components/common/AttachmentInput.vue index 5896f9d02..e4486c0ca 100644 --- a/front/src/components/common/AttachmentInput.vue +++ b/front/src/components/common/AttachmentInput.vue @@ -6,7 +6,7 @@ import { BackendError } from '~/types' import { useStore } from 'vuex' interface Props { - modelValue: string + modelValue: string | null imageClass?: string required?: boolean name?: string | undefined diff --git a/front/src/init/directives.ts b/front/src/init/directives.ts index dcd5b5761..101b94333 100644 --- a/front/src/init/directives.ts +++ b/front/src/init/directives.ts @@ -13,8 +13,7 @@ export const install: InitModule = ({ app, store }) => { action (text: string, value: string, $el: JQuery) { // used to ensure focusing the dropdown and clicking via keyboard // works as expected - const button = $el[0] - button.click() + $el[0]?.click() // @ts-expect-error jQuery(el).find('.ui.dropdown').dropdown('hide') }, diff --git a/front/src/main.ts b/front/src/main.ts index 91476cd58..1761f9c0a 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -8,8 +8,8 @@ import useTheme from '~/composables/useTheme' useTheme() configureCompat({ - RENDER_FUNCTION: false - // COMPONENT_V_MODEL: false + RENDER_FUNCTION: false, + COMPONENT_V_MODEL: false }) const logger = useLogger()