From 71b2ed5f04d7fb909f8f951eed1bebcb3a1694b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Wed, 29 Jul 2020 14:25:26 +0200 Subject: [PATCH] fix: remove deprecation warning The deprecated constant is always initialized, no matter if it's used or not. --- src/lib/intl.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/lib/intl.ts b/src/lib/intl.ts index 83207dd..38c4807 100644 --- a/src/lib/intl.ts +++ b/src/lib/intl.ts @@ -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[],