[MM-62395] Don't attempt to set boundaries for a window that is no longer attached (#3278)

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Devin Binnie
2025-01-08 09:56:05 -05:00
committed by GitHub
parent e700475ee5
commit f64e9ab048

View File

@@ -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);