Skip to content

Commit 4a59ecf

Browse files
committed
fix number format polyfill isn't applied
1 parent d4dd40a commit 4a59ecf

4 files changed

Lines changed: 3 additions & 18 deletions

File tree

src/libs/NumberFormatUtils/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import intlPolyfill from '@libs/IntlPolyfill';
12
import memoize from '@libs/memoize';
23
import CONST from '@src/CONST';
34
import type Locale from '@src/types/onyx/Locale';
4-
import initPolyfill from './intlPolyfill';
55

6-
initPolyfill();
6+
// Polyfill the Intl API if locale data is not as expected
7+
intlPolyfill();
78

89
const MemoizedNumberFormat = memoize(Intl.NumberFormat, {maxSize: 10, monitoringName: 'NumberFormatUtils'});
910

src/libs/NumberFormatUtils/intlPolyfill.ios.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/libs/NumberFormatUtils/intlPolyfill.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/setup/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {I18nManager} from 'react-native';
22
import Onyx from 'react-native-onyx';
3-
import intlPolyfill from '@libs/IntlPolyfill';
43
import {setDeviceID} from '@userActions/Device';
54
import initLocale from '@userActions/Locale';
65
import initOnyxDerivedValues from '@userActions/OnyxDerived';
@@ -64,9 +63,6 @@ export default function () {
6463
I18nManager.allowRTL(false);
6564
I18nManager.forceRTL(false);
6665

67-
// Polyfill the Intl API if locale data is not as expected
68-
intlPolyfill();
69-
7066
// Perform any other platform-specific setup
7167
platformSetup();
7268

0 commit comments

Comments
 (0)