Skip to content

Commit

Permalink
fix(@formatjs/intl-utils): dont default locales to empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
Long Ho committed May 15, 2020
1 parent f93b381 commit 7f50edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/intl-utils/src/get-canonical-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export function getCanonicalLocales(locales?: string | string[]): string[] {
// NOTE: we must NOT call `supportedLocalesOf` of a formatjs polyfill, or their implementation
// will even eventually call this method recursively. Here we use `Intl.DateTimeFormat` since it
// is not polyfilled by `@formatjs`.
return Intl.DateTimeFormat.supportedLocalesOf(locales || '');
return Intl.DateTimeFormat.supportedLocalesOf(locales);
}

0 comments on commit 7f50edc

Please sign in to comment.