File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1408,9 +1408,6 @@ fixed.exec = function(str) {
1408
1408
}
1409
1409
1410
1410
// Attach named capture properties
1411
- if ( XRegExp . isInstalled ( 'namespacing' ) ) {
1412
- match . groups = undefined ;
1413
- }
1414
1411
if ( this [ REGEX_DATA ] && this [ REGEX_DATA ] . captureNames ) {
1415
1412
let groupsObject = match ;
1416
1413
if ( XRegExp . isInstalled ( 'namespacing' ) ) {
@@ -1425,6 +1422,9 @@ fixed.exec = function(str) {
1425
1422
groupsObject [ name ] = match [ i ] ;
1426
1423
}
1427
1424
}
1425
+ // Preserve any existing `groups` obj that came from native ES2018 named capture
1426
+ } else if ( ! match . groups && XRegExp . isInstalled ( 'namespacing' ) ) {
1427
+ match . groups = undefined ;
1428
1428
}
1429
1429
1430
1430
// Fix browsers that increment `lastIndex` after zero-length matches
You can’t perform that action at this time.
0 commit comments