Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit abd709a

Browse files
committed
Get rid of unnecessary 'else'
1 parent 0fd7eb8 commit abd709a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/util.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ export function translate(str, replaceStrings = null) {
3030
export function getWindowWidth() {
3131
if (typeof window === 'undefined') {
3232
return 0;
33-
} else {
34-
return window.innerWidth ||
33+
}
34+
35+
return window.innerWidth ||
3536
document.documentElement.clientWidth ||
3637
document.body.clientWidth;
37-
}
3838
}
3939

4040
export function getWindowHeight() {
4141
if (typeof window === 'undefined') {
4242
return 0;
43-
} else {
44-
return window.innerHeight ||
45-
document.documentElement.clientHeight ||
46-
document.body.clientHeight;
4743
}
44+
45+
return window.innerHeight ||
46+
document.documentElement.clientHeight ||
47+
document.body.clientHeight;
4848
}
4949

5050
// Returns true if this window is rendered as an iframe inside another window

0 commit comments

Comments
 (0)