From 681a75525517a9a2c6e2a2bf33e41327603bb7b7 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Mon, 26 Sep 2022 08:48:25 +0200 Subject: [PATCH] refactor: apply PR review --- lib/fetch/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fetch/util.js b/lib/fetch/util.js index fe77699302f..dcfc0f542d6 100644 --- a/lib/fetch/util.js +++ b/lib/fetch/util.js @@ -361,7 +361,7 @@ function determineRequestsReferrer (request) { */ if (request.referrer === 'client') { // Not defined in Node but part of the spec - if (environment?.globalObject instanceof Window) { // eslint-disable-line + if (request.client?.globalObject?.constructor?.name === 'Window' ) { // eslint-disable-line const origin = environment.globalObject.self?.origin ?? environment.globalObject.location?.origin // If document’s origin is an opaque origin, return no referrer.