chore:优化多语言注册方式 (#5227)

This commit is contained in:
qinhaoyan 2022-08-24 20:47:43 +08:00 committed by GitHub
parent ba6aae8898
commit 98d0d213bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,8 @@ const locales: {
} = {};
export function register(name: string, config: LocaleConfig) {
locales[name] = config;
// 修改为扩展,防止已注册的语料被覆盖
extendLocale(name, config);
}
export function extendLocale(name: string, config: LocaleConfig) {