From af5f9950f77a3c11b49394c048843398ad608019 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Wed, 22 Mar 2023 09:49:58 +0800 Subject: [PATCH] type: remove useless assertion (#41385) --- .dumi/hooks/useLocale.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.dumi/hooks/useLocale.ts b/.dumi/hooks/useLocale.ts index 328e204946..9bc0dc4d48 100644 --- a/.dumi/hooks/useLocale.ts +++ b/.dumi/hooks/useLocale.ts @@ -9,6 +9,6 @@ export default function useLocale( localeMap?: LocaleMap, ): [Record, 'cn' | 'en'] { const { id } = useDumiLocale(); - const localeType = id === 'zh-CN' ? 'cn' : ('en' as const); - return [localeMap?.[localeType]!, localeType]; + const localeType = id === 'zh-CN' ? 'cn' : 'en'; + return [localeMap?.[localeType], localeType]; }