fix: handle potential missing close event property (#46620)
fix: handle missing close event property Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
23035a587e
commit
f2a27511b1
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ BrowserWindow.prototype._init = function (this: BWT) {
|
|||
});
|
||||
this.on('close', (event) => {
|
||||
queueMicrotask(() => {
|
||||
if (!unresponsiveEvent && !event.defaultPrevented) {
|
||||
if (!unresponsiveEvent && !event?.defaultPrevented) {
|
||||
unresponsiveEvent = setTimeout(emitUnresponsiveEvent, 5000);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue