Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid 1.toString() minification in core-js for compatibility with Cloudflare #1370

Closed
nureweb opened this issue Sep 29, 2024 · 1 comment

Comments

@nureweb
Copy link

nureweb commented Sep 29, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/core-js/internals/uid.js b/node_modules/core-js/internals/uid.js
index e2230f1..38fb151 100644
--- a/node_modules/core-js/internals/uid.js
+++ b/node_modules/core-js/internals/uid.js
@@ -2,7 +2,7 @@ var uncurryThis = require('../internals/function-uncurry-this');
 
 var id = 0;
 var postfix = Math.random();
-var toString = uncurryThis(1.0.toString);
+var toString = uncurryThis((1).toString);
 
 module.exports = function (key) {
   return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);

This issue body was partially generated by patch-package.

@zloirock
Copy link
Owner

#1368 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants