Skip to content

Commit 1292e09

Browse files
author
Marcos Andrei Ivanechtchuk
committed
fixing typeof use
1 parent 9500e6e commit 1292e09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import { PROXY_URL } from '../utils/consts'
55
import { type } from 'os';
66

77
function isBrowser(){
8-
return typeof window !== undefined;
8+
return typeof window !== 'undefined';
99
}
1010

1111
function isHttps(){
12-
return location && location.protocol === 'https:';
12+
return typeof location !== 'undefined' && location.protocol === 'https:';
1313
}
1414

1515
function shouldUseProxy(){
16-
return isBrowser && !isHttps();
16+
return isBrowser() && !isHttps();
1717
}
1818

1919
/* istanbul ignore next */

0 commit comments

Comments
 (0)