1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

fix null ref

This commit is contained in:
Kyle Spearrin
2018-02-15 14:05:01 -05:00
parent 719ccb3948
commit 12a51eed89

View File

@@ -123,7 +123,7 @@ export class WindowMain {
private windowStateChangeHandler(configKey: string, win: BrowserWindow) {
global.clearTimeout(this.windowStateChangeTimer);
this.windowStateChangeTimer = setTimeout(async () => {
this.windowStateChangeTimer = global.setTimeout(async () => {
await this.updateWindowState(configKey, win);
}, WindowEventHandlingDelay);
}
@@ -183,12 +183,14 @@ export class WindowMain {
}
}
if (displayBounds != null) {
if (state.width > displayBounds.width) {
state.width = displayBounds.width;
}
if (state.height > displayBounds.height) {
state.height = displayBounds.height;
}
}
return state;
}