Skip to content

Commit 5bb0e05

Browse files
unnecessary RegExp instantiation
1 parent 31dfc49 commit 5bb0e05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/js.cookie.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
var matches = value.match(/(%[0-9A-Z]{2})+/g);
2323
while ( matches && matches.length ) {
2424
var match = matches.shift();
25-
value = value.replace(new RegExp(match, 'g'), decodeURIComponent(match));
25+
value = value.replace(match, decodeURIComponent(match));
2626
}
2727
return value;
2828
}

0 commit comments

Comments
 (0)