Skip to content

Commit

Permalink
fix: [LocaleProvider] add fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
akai committed Jul 13, 2021
1 parent 8adf043 commit 8948912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/LocaleProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const useLocale = (comp?: string, fallback?: any) => {
if (!localeContext) {
strings = fallback;
} else if (comp) {
strings = strings[comp];
strings = strings[comp] || {};
}

return {
Expand Down

0 comments on commit 8948912

Please sign in to comment.