File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ const {
3535 SafeSet,
3636 SafeWeakMap,
3737 SafeWeakRef,
38+ StringPrototypeIncludes,
3839 StringPrototypeReplace,
3940 StringPrototypeToLowerCase,
4041 StringPrototypeToUpperCase,
@@ -473,7 +474,7 @@ function spliceOne(list, index) {
473474 list . pop ( ) ;
474475}
475476
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 [ \\ / ] / ;
477478
478479let getStructuredStack ;
479480
@@ -503,8 +504,12 @@ function isInsideNodeModules() {
503504 const filename = frame . getFileName ( ) ;
504505 // If a filename does not start with / or contain \,
505506 // it's likely from Node.js core.
506- if ( RegExpPrototypeExec ( / ^ \/ | \\ / , filename ) === null )
507+ if (
508+ filename [ 0 ] !== '/' &&
509+ StringPrototypeIncludes ( filename , '\\' ) === false
510+ ) {
507511 continue ;
512+ }
508513 return RegExpPrototypeExec ( kNodeModulesRE , filename ) !== null ;
509514 }
510515 }
You can’t perform that action at this time.
0 commit comments