[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:
Devin Binnie
2022-05-11 10:08:43 -04:00
committed by GitHub
parent 8dd7d3dcc5
commit 99873c6669

View File

@@ -168,7 +168,7 @@ export function resizeScreen(browserWindow: BrowserWindow) {
}
}
browserWindow.on('restore', handle);
browserWindow.once('restore', handle);
handle();
}