Skip to content

Commit

Permalink
add a workaround for babel-minify bug, fix #479
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 22, 2019
1 parent 18fb323 commit 9ce060c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-js/modules/es.string.split.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xffffffff;

// eslint-disable-next-line no-new
var SUPPORTS_Y = !fails(function () { new RegExp('x', 'y'); });
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });

// @@split logic
require('../internals/fix-regexp-well-known-symbol-logic')(
Expand Down

0 comments on commit 9ce060c

Please sign in to comment.