diff --git a/src/main/views/modalView.ts b/src/main/views/modalView.ts index f5825ca8..4ba8efb0 100644 --- a/src/main/views/modalView.ts +++ b/src/main/views/modalView.ts @@ -66,7 +66,9 @@ export class ModalView { // Linux sometimes doesn't have the bound initialized correctly initially, so we wait to set them const setBoundsFunction = () => { - this.view.setBounds(getWindowBoundaries(this.windowAttached!)); + if (this.windowAttached) { + this.view.setBounds(getWindowBoundaries(this.windowAttached)); + } }; if (process.platform === 'linux') { setTimeout(setBoundsFunction, 10);