Skip to content

Commit

Permalink
Add destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
jarda-svoboda committed Mar 31, 2022
1 parent ea6b448 commit a2175f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ export default class I18n<ParserParams extends Parser.Params = any> {
if (!config) throw new Error('[i18n]: No config provided!');

let { initLocale, fallbackLocale, translations, debug, ...rest } = config;
initLocale = sanitizeLocales(initLocale)[0];
fallbackLocale = sanitizeLocales(fallbackLocale)[0];
[initLocale] = sanitizeLocales(initLocale);
[fallbackLocale] = sanitizeLocales(fallbackLocale);

if (debug) console.debug('[i18n]: Setting config.');

Expand Down

0 comments on commit a2175f0

Please sign in to comment.