Skip to content

Commit

Permalink
fix(@formatjs/intl-locale): remove Intl check
Browse files Browse the repository at this point in the history
Refer to https://formatjs.io/docs/polyfills to check the correct Intl API hierarchy
  • Loading branch information
longlho committed Jun 5, 2021
1 parent 85f221c commit 8632739
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/intl-locale/should-polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,5 @@ function hasIntlGetCanonicalLocalesBug(): boolean {
}

export function shouldPolyfill() {
return (
typeof Intl === 'undefined' ||
!('Locale' in Intl) ||
hasIntlGetCanonicalLocalesBug()
)
return !('Locale' in Intl) || hasIntlGetCanonicalLocalesBug()
}

0 comments on commit 8632739

Please sign in to comment.