Combine repeated accesses to globals.mainWin!
This commit is contained in:
parent
a2eff72147
commit
5d774ad325
1 changed files with 4 additions and 3 deletions
|
@ -82,10 +82,11 @@ handle(IpcEvents.MINIMIZE, e => {
|
||||||
});
|
});
|
||||||
|
|
||||||
handle(IpcEvents.MAXIMIZE, e => {
|
handle(IpcEvents.MAXIMIZE, e => {
|
||||||
if (globals.mainWin!.isMaximized()) {
|
const mainWin = globals.mainWin!;
|
||||||
globals.mainWin!.unmaximize();
|
if (mainWin.isMaximized()) {
|
||||||
|
mainWin.unmaximize();
|
||||||
} else {
|
} else {
|
||||||
globals.mainWin!.maximize();
|
mainWin.maximize();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue