Skip to content

Commit

Permalink
[Fix] split: add a function name to the "broken capturing groups" shim
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 16, 2020
1 parent 8f33c6b commit 0fda3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es5-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@
var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group
var maxSafe32BitInt = Math.pow(2, 32) - 1;

StringPrototype.split = function (separator, limit) {
StringPrototype.split = function split(separator, limit) {
var string = String(this);
if (typeof separator === 'undefined' && limit === 0) {
return [];
Expand Down

0 comments on commit 0fda3b8

Please sign in to comment.