Skip to content

Commit

Permalink
Fix bug zloirock#463
Browse files Browse the repository at this point in the history
The minifier correctly inlines an overwritten function, leading to a call
stack overflow error. This commit refactors the code a bit to prevent
the mifnier from inlining that variable.
  • Loading branch information
nicolo-ribaudo committed Dec 17, 2018
1 parent f980318 commit af4a972
Show file tree
Hide file tree
Showing 7 changed files with 648 additions and 540 deletions.
4 changes: 3 additions & 1 deletion client/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -6471,7 +6471,7 @@ var SUPPORTS_Y = !!(function () { try { return new RegExp('x', 'y'); } catch (e)

// @@split logic
__webpack_require__(62)('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
var internalSplit = $split;
var internalSplit;
if (
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
Expand Down Expand Up @@ -6517,6 +6517,8 @@ __webpack_require__(62)('split', 2, function (defined, SPLIT, $split, maybeCallN
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
};
} else {
internalSplit = $split;
}

return [
Expand Down
2 changes: 1 addition & 1 deletion client/core.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/core.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit af4a972

Please sign in to comment.