[MM-44117] Fix stack overflow where window resize would constantly emit the restore event (#2099)
* Fix stack overflow where window resize would constantly call the restore function * Use browserWindow.once
This commit is contained in:
@@ -168,7 +168,7 @@ export function resizeScreen(browserWindow: BrowserWindow) {
|
||||
}
|
||||
}
|
||||
|
||||
browserWindow.on('restore', handle);
|
||||
browserWindow.once('restore', handle);
|
||||
handle();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user