mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
fix null ref
This commit is contained in:
parent
719ccb3948
commit
12a51eed89
@ -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,11 +183,13 @@ export class WindowMain {
|
||||
}
|
||||
}
|
||||
|
||||
if (state.width > displayBounds.width) {
|
||||
state.width = displayBounds.width;
|
||||
}
|
||||
if (state.height > displayBounds.height) {
|
||||
state.height = displayBounds.height;
|
||||
if (displayBounds != null) {
|
||||
if (state.width > displayBounds.width) {
|
||||
state.width = displayBounds.width;
|
||||
}
|
||||
if (state.height > displayBounds.height) {
|
||||
state.height = displayBounds.height;
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
|
Loading…
Reference in New Issue
Block a user