diff --git a/lib/browser/api/menu.js b/lib/browser/api/menu.js index d15457238c0b..33e0b1e4ce63 100644 --- a/lib/browser/api/menu.js +++ b/lib/browser/api/menu.js @@ -48,11 +48,8 @@ Menu.prototype.popup = function (window, x, y, positioningItem) { let opts // menu.popup(x, y, positioningItem) - if (!window) { - // shift over values - if (typeof window !== 'object' || window.constructor !== BrowserWindow) { - [newPosition, newY, newX, newWindow] = [y, x, window, null] - } + if (window && typeof window !== 'object' || window.constructor !== BrowserWindow) { + [newPosition, newY, newX, newWindow] = [y, x, window, null] } // menu.popup({})