Skip to content

Commit 4c95a93

Browse files
committed
chore: updated intl patch to add a comment
1 parent bb4f43a commit 4c95a93

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

patches/intl+1.2.5.patch

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/intl/lib/core.js b/node_modules/intl/lib/core.js
2-
index 9334cfc..4525a08 100644
2+
index 9334cfc..552a228 100644
33
--- a/node_modules/intl/lib/core.js
44
+++ b/node_modules/intl/lib/core.js
55
@@ -540,7 +540,7 @@ function createRegExpRestore() {
@@ -11,11 +11,24 @@ index 9334cfc..4525a08 100644
1111
multiline: RegExp.multiline,
1212
input: RegExp.input
1313
},
14-
@@ -4291,6 +4291,7 @@ defineProperty(Intl, '__applyLocaleSensitivePrototypes', {
14+
@@ -4291,6 +4291,12 @@ defineProperty(Intl, '__applyLocaleSensitivePrototypes', {
1515
writable: true,
1616
configurable: true,
1717
value: function value() {
18-
+ return null;
18+
+ return null;
19+
+ /*
20+
+ XXX: These are mutating Number and Date prototypes which is blocked by SES, causing the app to crash.
21+
+ Since we're not using toLocaleString anywhere in our code, I'm just returning `null` here.
22+
+ */
23+
+ /*
1924
defineProperty(Number.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Number.toLocaleString });
2025
// Need this here for IE 8, to avoid the _DontEnum_ bug
2126
defineProperty(Date.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Date.toLocaleString });
27+
@@ -4298,6 +4304,7 @@ defineProperty(Intl, '__applyLocaleSensitivePrototypes', {
28+
for (var k in ls.Date) {
29+
if (hop.call(ls.Date, k)) defineProperty(Date.prototype, k, { writable: true, configurable: true, value: ls.Date[k] });
30+
}
31+
+ */
32+
}
33+
});
34+

0 commit comments

Comments
 (0)