Skip to content

Commit

Permalink
fix(next): add the default language when the language is undefined (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Grapedge authored Aug 3, 2021
1 parent 739e8c1 commit c74e7f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/src/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const Form: React.FC<FormProps> = ({
previewTextPlaceholder,
...props
}) => {
const lang = (ConfigProvider as any).getContext()?.locale?.momentLocale
const lang =
(ConfigProvider as any).getContext()?.locale?.momentLocale ?? 'zh-CN'
useMemo(() => {
const validateLanguage = getValidateLocaleIOSCode(lang)
setValidateLanguage(validateLanguage)
Expand Down

0 comments on commit c74e7f9

Please sign in to comment.