Skip to content

Commit

Permalink
fix(AOT): Resize JS error
Browse files Browse the repository at this point in the history
  • Loading branch information
hristoterezov committed Oct 23, 2019
1 parent c5e2a0d commit 74dd71a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions alwaysontop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ function setAspectRatioToResizeableWindow(win, aspectRatio) {
}
});
win.on('resize', () => {
if (!Array.isArray(oldSize) || oldSize.length !== 2) {
// Adding this check because of reports for JS errors that oldSize is undefined.
return;
}

let [ width, height ] = win.getSize();

//we scale either width or height according to the other by checking which of the 2
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jitsi-meet-electron-utils",
"version": "1.0.2",
"version": "1.0.3",
"description": "Utilities for jitsi-meet-electron project",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 74dd71a

Please sign in to comment.