We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9500e6e commit 1292e09Copy full SHA for 1292e09
src/services/index.js
@@ -5,15 +5,15 @@ import { PROXY_URL } from '../utils/consts'
5
import { type } from 'os';
6
7
function isBrowser(){
8
- return typeof window !== undefined;
+ return typeof window !== 'undefined';
9
}
10
11
function isHttps(){
12
- return location && location.protocol === 'https:';
+ return typeof location !== 'undefined' && location.protocol === 'https:';
13
14
15
function shouldUseProxy(){
16
- return isBrowser && !isHttps();
+ return isBrowser() && !isHttps();
17
18
19
/* istanbul ignore next */
0 commit comments