Skip to content

Commit f60650f

Browse files
!fixup: account for node:internal in isMain check
Co-Authored-By: Marco Ippolito <[email protected]>
1 parent 4276af1 commit f60650f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/modules/esm/resolve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ function defaultResolve(specifier, context = {}) {
965965
if (protocol === 'node:') { return { __proto__: null, url: specifier }; }
966966

967967

968-
const isMain = parentURL === undefined;
968+
const isMain = parentURL === undefined || StringPrototypeStartsWith(parentURL, 'node:internal/');
969969
if (isMain) {
970970
parentURL = getCWDURL().href;
971971

0 commit comments

Comments
 (0)