Skip to content

Commit

Permalink
fix: remove deprecation warning
Browse files Browse the repository at this point in the history
The deprecated constant is always initialized, no matter if it's used or not.
  • Loading branch information
connor-baer committed Jul 29, 2020
1 parent a792f26 commit 71b2ed5
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/lib/intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,7 @@ export const isNumberFormatToPartsSupported = (() => {
* @deprecated Whether the `Intl` and `Intl.NumberFormat` APIs
* are supported by the runtime.
*/
export const isIntlSupported = (() => {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn(
[
'DEPRECATED: isIntlSupported has been replaced',
'by isNumberFormatSupported & isNumberFormatToPartsSupported',
'and will be removed in the next major version.',
].join(' '),
);
}
return isNumberFormatSupported;
})();
export const isIntlSupported = isNumberFormatSupported;

let memoizedIntl: (
locales?: Locale | Locale[],
Expand Down

0 comments on commit 71b2ed5

Please sign in to comment.