Skip to content

Commit

Permalink
Merge d6914ca into e0afcd1
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyanziano committed Oct 9, 2018
2 parents e0afcd1 + d6914ca commit 07ded54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/app/main/src/services/contextMenuService.ts
Expand Up @@ -31,12 +31,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import { Menu, MenuItem, MenuItemConstructorOptions } from 'electron';
import { Menu, MenuItemConstructorOptions } from 'electron';

export class ContextMenuService {
private static currentMenu: Menu;

public static showMenuAndWaitForInput(options: Partial<MenuItemConstructorOptions>[]): Promise<any> {
public static showMenuAndWaitForInput(options: Partial<MenuItemConstructorOptions>[] = []): Promise<any> {
if (ContextMenuService.currentMenu) {
ContextMenuService.currentMenu.closePopup();
}
Expand All @@ -53,7 +53,7 @@ export class ContextMenuService {
});
const menu = ContextMenuService.currentMenu = Menu.buildFromTemplate(template);

menu.popup();
menu.popup({});
});
}
}

0 comments on commit 07ded54

Please sign in to comment.