File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ const {
35
35
SafeSet,
36
36
SafeWeakMap,
37
37
SafeWeakRef,
38
+ StringPrototypeIncludes,
38
39
StringPrototypeReplace,
39
40
StringPrototypeToLowerCase,
40
41
StringPrototypeToUpperCase,
@@ -473,7 +474,7 @@ function spliceOne(list, index) {
473
474
list . pop ( ) ;
474
475
}
475
476
476
- const kNodeModulesRE = / ^ ( .* ) [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ;
477
+ const kNodeModulesRE = / ^ (?: .* ) [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ;
477
478
478
479
let getStructuredStack ;
479
480
@@ -503,8 +504,12 @@ function isInsideNodeModules() {
503
504
const filename = frame . getFileName ( ) ;
504
505
// If a filename does not start with / or contain \,
505
506
// it's likely from Node.js core.
506
- if ( RegExpPrototypeExec ( / ^ \/ | \\ / , filename ) === null )
507
+ if (
508
+ filename [ 0 ] !== '/' &&
509
+ StringPrototypeIncludes ( filename , '\\' ) === false
510
+ ) {
507
511
continue ;
512
+ }
508
513
return RegExpPrototypeExec ( kNodeModulesRE , filename ) !== null ;
509
514
}
510
515
}
You can’t perform that action at this time.
0 commit comments