Skip to content

Commit 9a62fbd

Browse files
author
Marcos Andrei Ivanechtchuk
committed
following code pattern
1 parent 1292e09 commit 9a62fbd

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

dist/cep-promise-browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,15 @@ function throwApplicationError$2(error) {
359359
}
360360

361361
function isBrowser() {
362-
return (typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== undefined;
362+
return typeof window !== 'undefined';
363363
}
364364

365365
function isHttps() {
366-
return location && location.protocol === 'https:';
366+
return typeof location !== 'undefined' && location.protocol === 'https:';
367367
}
368368

369369
function shouldUseProxy() {
370-
return isBrowser && !isHttps();
370+
return isBrowser() && !isHttps();
371371
}
372372

373373
/* istanbul ignore next */

dist/cep-promise-browser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cep-promise.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ function throwApplicationError$2(error) {
284284
}
285285

286286
function isBrowser() {
287-
return (typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== undefined;
287+
return typeof window !== 'undefined';
288288
}
289289

290290
function isHttps() {
291-
return location && location.protocol === 'https:';
291+
return typeof location !== 'undefined' && location.protocol === 'https:';
292292
}
293293

294294
function shouldUseProxy() {
295-
return isBrowser && !isHttps();
295+
return isBrowser() && !isHttps();
296296
}
297297

298298
/* istanbul ignore next */

0 commit comments

Comments
 (0)