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 => {
|
||||
if (globals.mainWin!.isMaximized()) {
|
||||
globals.mainWin!.unmaximize();
|
||||
const mainWin = globals.mainWin!;
|
||||
if (mainWin.isMaximized()) {
|
||||
mainWin.unmaximize();
|
||||
} else {
|
||||
globals.mainWin!.maximize();
|
||||
mainWin.maximize();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue