Skip to content

Commit 1fe6026

Browse files
committed
Fix checking of window global variable in strict mode
Previous version of the check failed in strict mode with error "window is not defined". Strict mode is default in Webpack.
1 parent 9424ed5 commit 1fe6026

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v1/internal/browser/browser-channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,5 +300,5 @@ function verifyEncryptionSettings(encryptionOn, encryptionOff, secureProtocol) {
300300
}
301301

302302
function detectWebPageProtocol() {
303-
return window && window.location ? window.location.protocol : null;
303+
return typeof window != 'undefined' && window.location ? window.location.protocol : null;
304304
}

0 commit comments

Comments
 (0)