We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9881fba commit 2149593Copy full SHA for 2149593
src/locale/useLocale.tsx
@@ -32,6 +32,7 @@ export interface Locale {
32
SpreadSheet: {
33
description: string;
34
copy: string;
35
+ copyCol: string;
36
copyAll: string;
37
};
38
}
@@ -52,10 +53,8 @@ const useLocale = <C extends LocaleComponentName = LocaleComponentName>(
52
53
const getLocale = useMemo(() => {
54
const locale = defaultLocaleData[componentName] ?? {};
55
const localeFromContext = fullLocale?.locale[componentName] ?? {};
- return {
56
- ...(locale as unknown as object),
57
- ...(localeFromContext as unknown as object),
58
- } as NonNullable<Locale[C]>;
+
+ return Object.assign({}, locale, localeFromContext) as NonNullable<Locale[C]>;
59
}, [componentName, fullLocale]);
60
61
return getLocale;
0 commit comments