diff --git a/package.json b/package.json index a55a22f..2eddacd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron-contextmenu-wrapper", - "version": "4.0.1", + "version": "4.0.2", "description": "Sane context menu handler", "scripts": { "doc": "esdoc -c ./esdoc.json", diff --git a/src/context-menu-builder.js b/src/context-menu-builder.js index f6bfbfd..4fc9c38 100644 --- a/src/context-menu-builder.js +++ b/src/context-menu-builder.js @@ -103,6 +103,8 @@ class ContextMenuBuilder { if (!menu) return; this.menu = menu; this.menu.popup({window: this.windowOrWebView}); + contextMenuPrepends = []; + contextMenuAppends = []; } /** @@ -413,7 +415,7 @@ class ContextMenuBuilder { /** * @param {String} menuType link, image, textinput, or text - * @param {MenuItem} menuItem + * @param {MenuItem} menuItem */ appendContextMenuItem(menuType, menuItem) { contextMenuAppends.push({type: menuType, item: menuItem});