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
|
||||
}
|
||||
|
||||
// menu.popup({})
|
||||
if (window != null && window.constructor === Object) {
|
||||
// menu.popup({}) || menu.popup(window, callback)
|
||||
if ((window != null && window.constructor === Object) ||
|
||||
(x && typeof x === 'function')) {
|
||||
opts = window
|
||||
callback = arguments[1]
|
||||
// menu.popup(window, {})
|
||||
|
|
Loading…
Reference in a new issue