mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 16:07:33 +08:00
import robustness
This commit is contained in:
+2
-1
@@ -4,6 +4,7 @@ import { defineStore } from 'pinia';
|
||||
import { useSettingsStore } from './setting.ts';
|
||||
|
||||
import { WeekDay } from '@/core/datetime.ts';
|
||||
import { FiscalYearStart } from '@/core/fiscalyear.ts';
|
||||
|
||||
import {
|
||||
type UserBasicInfo,
|
||||
@@ -68,7 +69,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
|
||||
const currentUserFiscalYearStart = computed<number>(() => {
|
||||
const userInfo = currentUserBasicInfo.value || EMPTY_USER_BASIC_INFO;
|
||||
return userInfo.fiscalYearStart;
|
||||
return isNumber(userInfo.fiscalYearStart) && FiscalYearStart.valueOf(userInfo.fiscalYearStart) ? userInfo.fiscalYearStart : EMPTY_USER_BASIC_INFO.fiscalYearStart;
|
||||
});
|
||||
|
||||
const currentUserLongDateFormat = computed<number>(() => {
|
||||
|
||||
Reference in New Issue
Block a user