Skip to content

Commit 6f910e4

Browse files
module: exclude node: prefixed referrer as "parsable url"
1 parent f6a8cd0 commit 6f910e4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/internal/modules/helpers.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,13 @@ function normalizeReferrerURL(referrerName) {
263263
return pathToFileURL(referrerName).href;
264264
}
265265

266-
if (StringPrototypeStartsWith(referrerName, 'file://') ||
267-
URLCanParse(referrerName)) {
266+
if (
267+
StringPrototypeStartsWith(referrerName, 'file://') ||
268+
(
269+
!StringPrototypeStartsWith(referrerName, 'node:') &&
270+
URLCanParse(referrerName)
271+
)
272+
) {
268273
return referrerName;
269274
}
270275

0 commit comments

Comments
 (0)