Skip to content

Commit

Permalink
update String#matchAll per tc39/ecma262#1517
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Apr 24, 2019
1 parent 8f3dc03 commit 484e3d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core-js/modules/es.string.match-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ var $RegExpStringIterator = createIteratorConstructor(function RegExpStringItera
var $matchAll = function (string) {
var R = anObject(this);
var S = String(string);
var C, flags, matcher, global, fullUnicode;
var C, flagsValue, flags, matcher, global, fullUnicode;
C = speciesConstructor(R, RegExp);
flags = 'flags' in RegExpPrototype ? String(R.flags) : getFlags.call(R);
flagsValue = R.flags;
flags = flagsValue === undefined ? 'flags' in RegExpPrototype ? '' : getFlags.call(R) : String(flagsValue);
matcher = new C(C === RegExp ? R.source : R, flags);
global = !!~flags.indexOf('g');
fullUnicode = !!~flags.indexOf('u');
Expand Down

0 comments on commit 484e3d9

Please sign in to comment.