diff --git a/lib/browser/api/menu.js b/lib/browser/api/menu.js index 5e612ef9f78d..41244c69afb1 100644 --- a/lib/browser/api/menu.js +++ b/lib/browser/api/menu.js @@ -44,7 +44,7 @@ Menu.prototype._init = function () { } Menu.prototype.popup = function (options) { - let {window, x, y, positionItem, callback} = options + let {window, x, y, positioningItem, callback} = options // no callback passed if (!callback || typeof callback !== 'function') callback = () => {} @@ -52,7 +52,7 @@ Menu.prototype.popup = function (options) { // set defaults if (typeof x !== 'number') x = -1 if (typeof y !== 'number') y = -1 - if (typeof positionItem !== 'number') positionItem = -1 + if (typeof positioningItem !== 'number') positioningItem = -1 if (!window || (window && window.constructor !== BrowserWindow)) { window = BrowserWindow.getFocusedWindow() @@ -67,8 +67,8 @@ Menu.prototype.popup = function (options) { } } - this.popupAt(window, x, y, positionItem, callback) - return { browserWindow: window, x, y, position: positionItem } + this.popupAt(window, x, y, positioningItem, callback) + return { browserWindow: window, x, y, position: positioningItem } } Menu.prototype.closePopup = function (window) {