Skip to content

Commit

Permalink
[MM-62395] Don't attempt to set boundaries for a window that is no lo…
Browse files Browse the repository at this point in the history
…nger attached (#3278)

Co-authored-by: Mattermost Build <build@mattermost.com>
  • Loading branch information
devinbinnie and mattermost-build authored Jan 8, 2025
1 parent e700475 commit f64e9ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/views/modalView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export class ModalView<T, T2> {

// 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);
Expand Down

0 comments on commit f64e9ab

Please sign in to comment.