From 9814c9f01a834f16cb224a58d3a4fc7b3218d2bd Mon Sep 17 00:00:00 2001 From: waruneeta Date: Wed, 14 Feb 2024 09:58:38 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20convert=20?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/mixin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index 86f9cf771..1150d670f 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -77,7 +77,8 @@ export const useCounterMixin = defineStore("mixin", () => { isFullMonth: boolean = false, isTime: boolean = false ) { - if (srcDate == null) return null; + if (srcDate == null || !moment(srcDate).isValid()) return ""; + const dateMoment = moment(srcDate); const day = dateMoment.format("DD"); const month = dateMoment.format(isFullMonth ? "MMMM" : "MMM");