🔧 Feedback

This commit is contained in:
Felix Rieseberg 2017-12-11 14:43:35 -08:00
parent 76df41b5d0
commit c4ec8b4545
2 changed files with 12 additions and 2 deletions

View file

@ -48,12 +48,12 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
let opts
// menu.popup(x, y, positioningItem)
if (window && typeof window !== 'object' || window.constructor !== BrowserWindow) {
if (window != null && !(window instanceof BrowserWindow)) {
[newPosition, newY, newX, newWindow] = [y, x, window, null]
}
// menu.popup({})
if (typeof window === 'object' && window.constructor !== BrowserWindow) {
if (window && window.constructor !== BrowserWindow) {
opts = window
// menu.popup(window, {})
} else if (x && typeof x === 'object') {