Skip to content

Commit

Permalink
prevent possible RegExp#exec problems in some old engines, close #920
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Mar 30, 2021
1 parent c815ffd commit d666798
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changelog
##### Unreleased
- [`Array` find from last proposal](https://github.com/tc39/proposal-array-find-from-last) moved to the stage 2, [March TC39 meeting](https://github.com/babel/proposals/issues/71#issuecomment-795916535)
- Prevented possible `RegExp#exec` problems in some old engines, [#920](https://github.com/zloirock/core-js/issues/920)
- Updated Samsung Internet compat data mapping to 14.0

##### 3.9.1 - 2021.03.01
Expand Down
3 changes: 2 additions & 1 deletion packages/core-js/internals/regexp-exec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use strict';
var regexpFlags = require('./regexp-flags');
var stickyHelpers = require('./regexp-sticky-helpers');
var shared = require('./shared');

var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var nativeReplace = shared('native-string-replace', String.prototype.replace);

var patchedExec = nativeExec;

Expand Down

0 comments on commit d666798

Please sign in to comment.