Skip to content

Commit

Permalink
fix: fix undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhaocl1997 committed Apr 15, 2021
1 parent 04167e9 commit c5a8280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/system/menu/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit c5a8280

Please sign in to comment.