Check that x is non-null

This commit is contained in:
Kevin Sawicki 2017-02-22 10:49:25 -08:00
parent a8d1a7aed4
commit d0b07d5c36

View file

@ -156,7 +156,7 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
} }
// menu.popup(window, {}) // menu.popup(window, {})
if (typeof x === 'object') { if (x != null && typeof x === 'object') {
const options = x const options = x
x = options.x x = options.x
y = options.y y = options.y