File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const {
3737 SafeWeakRef,
3838 StringPrototypeIncludes,
3939 StringPrototypeReplace,
40+ StringPrototypeStartsWith,
4041 StringPrototypeToLowerCase,
4142 StringPrototypeToUpperCase,
4243 Symbol,
@@ -515,11 +516,14 @@ function isInsideNodeModules() {
515516 if ( ArrayIsArray ( stack ) ) {
516517 for ( const frame of stack ) {
517518 const filename = frame . getFileName ( ) ;
518- // If a filename does not start with / or contain \,
519- // it's likely from Node.js core.
519+
520520 if (
521- filename [ 0 ] !== '/' &&
522- StringPrototypeIncludes ( filename , '\\' ) === false
521+ filename == null ||
522+ StringPrototypeStartsWith ( filename , 'node:' ) === true ||
523+ (
524+ filename [ 0 ] !== '/' &&
525+ StringPrototypeIncludes ( filename , '\\' ) === false
526+ )
523527 ) {
524528 continue ;
525529 }
You can’t perform that action at this time.
0 commit comments