From 2f4da5a74c6e87e44f5f86f3c39c126ae65e37c0 Mon Sep 17 00:00:00 2001 From: ihah Date: Mon, 13 Dec 2021 17:17:44 +0200 Subject: [PATCH] Added check if ref exists before calling it --- src/components/TDatepicker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TDatepicker.ts b/src/components/TDatepicker.ts index a3d364e..1b82636 100644 --- a/src/components/TDatepicker.ts +++ b/src/components/TDatepicker.ts @@ -570,7 +570,7 @@ const TDatepicker = HtmlInput.extend({ focus: () => void }; - (this.$refs.timePicker as TimePicker).focus(); + (this.$refs.timePicker as TimePicker)?.focus(); }, inputDateHandler(date: Date): void { this.dateWithoutTime = date;