Skip to content

Commit

Permalink
refactor: ♻️ remove warning log
Browse files Browse the repository at this point in the history
  • Loading branch information
moinulmoin committed Jan 1, 2024
1 parent 0e4b02f commit a04ac74
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ export function createUseChangeLocale<LocalesKeys>(
}

return function changeLocale(newLocale: LocalesKeys) {
if (newLocale === currentLocale) {
warn(`The locale '${newLocale}' is already set`);
return;
}
if (newLocale === currentLocale) return;

const importFnLocale = locales[newLocale as keyof typeof locales];

Expand Down

0 comments on commit a04ac74

Please sign in to comment.