Skip to content

Commit 197035a

Browse files
committed
drop unneeded step in a couple of loops
1 parent d1ded07 commit 197035a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core-js/modules/es.regexp.constructor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var handleDotAll = function (string) {
5656
var result = '';
5757
var brackets = false;
5858
var chr;
59-
for (; index <= length; index++) {
59+
for (; index < length; index++) {
6060
chr = charAt(string, index);
6161
if (chr === '\\') {
6262
result += chr + charAt(string, ++index);
@@ -85,7 +85,7 @@ var handleNCG = function (string) {
8585
var groupid = 0;
8686
var groupname = '';
8787
var chr;
88-
for (; index <= length; index++) {
88+
for (; index < length; index++) {
8989
chr = charAt(string, index);
9090
if (chr === '\\') {
9191
chr += charAt(string, ++index);

0 commit comments

Comments
 (0)