Skip to content

Commit 655ee3d

Browse files
rdwhPeterRao
authored andcommitted
🔧 fix bug for web worker (#667)
1: document is not available for web worker 2: location is available for web worker/UI thread
1 parent d200573 commit 655ee3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/browser/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function setRegion(region, internal, secure) {
5454

5555
// check local web protocol,if https secure default set true , if http secure default set false
5656
function isHttpsWebProtocol() {
57-
return document && document.location && document.location.protocol === 'https:';
57+
return location && location.protocol === 'https:';
5858
}
5959

6060
function Client(options, ctx) {

0 commit comments

Comments
 (0)