add conditional for menu.popup(window, callback)
This commit is contained in:
parent
55d4d74624
commit
cd9e7142e4
1 changed files with 3 additions and 2 deletions
|
@ -58,8 +58,9 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||||
callback = newPosition
|
callback = newPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
// menu.popup({})
|
// menu.popup({}) || menu.popup(window, callback)
|
||||||
if (window != null && window.constructor === Object) {
|
if ((window != null && window.constructor === Object) ||
|
||||||
|
(x && typeof x === 'function')) {
|
||||||
opts = window
|
opts = window
|
||||||
callback = arguments[1]
|
callback = arguments[1]
|
||||||
// menu.popup(window, {})
|
// menu.popup(window, {})
|
||||||
|
|
Loading…
Reference in a new issue