Update handling of limit to the current es6 draft.

This commit is contained in:
John-David Dalton
2016-04-08 08:48:29 -07:00
parent ee73c9b436
commit c1958daf65
2 changed files with 4 additions and 3 deletions

View File

@@ -13568,7 +13568,7 @@
separator += '';
if (separator == '' && reHasComplexSymbol.test(string)) {
var strSymbols = stringToArray(string);
return limit === undefined ? strSymbols : strSymbols.slice(0, limit < 0 ? 0 : limit);
return limit === undefined ? strSymbols : strSymbols.slice(0, limit >>> 0);
}
}
return string.split(separator, limit);