mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
fix null ref
This commit is contained in:
@@ -123,7 +123,7 @@ export class WindowMain {
|
|||||||
|
|
||||||
private windowStateChangeHandler(configKey: string, win: BrowserWindow) {
|
private windowStateChangeHandler(configKey: string, win: BrowserWindow) {
|
||||||
global.clearTimeout(this.windowStateChangeTimer);
|
global.clearTimeout(this.windowStateChangeTimer);
|
||||||
this.windowStateChangeTimer = setTimeout(async () => {
|
this.windowStateChangeTimer = global.setTimeout(async () => {
|
||||||
await this.updateWindowState(configKey, win);
|
await this.updateWindowState(configKey, win);
|
||||||
}, WindowEventHandlingDelay);
|
}, WindowEventHandlingDelay);
|
||||||
}
|
}
|
||||||
@@ -183,11 +183,13 @@ export class WindowMain {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.width > displayBounds.width) {
|
if (displayBounds != null) {
|
||||||
state.width = displayBounds.width;
|
if (state.width > displayBounds.width) {
|
||||||
}
|
state.width = displayBounds.width;
|
||||||
if (state.height > displayBounds.height) {
|
}
|
||||||
state.height = displayBounds.height;
|
if (state.height > displayBounds.height) {
|
||||||
|
state.height = displayBounds.height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
|
|||||||
Reference in New Issue
Block a user