From c5a82809bbcb1d3aa6a39007e4b979873ce5bcc0 Mon Sep 17 00:00:00 2001 From: zhaocl1997 <674351624@qq.com> Date: Thu, 15 Apr 2021 22:06:11 +0800 Subject: [PATCH] fix: fix undefined error --- src/views/system/menu/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/menu/utils.ts b/src/views/system/menu/utils.ts index 987eb908..e1e241cb 100644 --- a/src/views/system/menu/utils.ts +++ b/src/views/system/menu/utils.ts @@ -13,5 +13,5 @@ export const deepKeys = function* (t: Recordable, pre: any[] = []): Generator { */ export const getMaybeI18nMsg = (field: string | undefined) => { const { t } = useI18n() - return field!.includes('.') ? t(field!) : field + return field && field.includes('.') ? t(field!) : field }