Skip to content

Commit

Permalink
fix quitting game causing unhandled exception
Browse files Browse the repository at this point in the history
  • Loading branch information
antonk777 committed Nov 1, 2021
1 parent 1db1cb3 commit d06fef7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions native/scripts/services/windows-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export class WindowsService {
* @returns {Promise<any>}
*/
static close(name) {
await WindowsService.obtainWindow(name);

return new Promise((resolve, reject) => {
overwolf.windows.close(name, result => {
if (result.success) {
Expand Down
2 changes: 1 addition & 1 deletion native/windows/background/background-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class BackgroundController {

const states = windowsStates.resultV2;

const promises = []
const promises = [];

if (states[kWindowNames.DESKTOP] !== 'closed') {
promises.push(this.windowsService.minimize(kWindowNames.DESKTOP));
Expand Down

0 comments on commit d06fef7

Please sign in to comment.