Check that window is non-null before accessing constructor prop

This commit is contained in:
Kevin Sawicki 2017-02-22 12:52:43 -08:00
parent 5819acbc20
commit 3e05350d6b

View file

@ -147,7 +147,7 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
let asyncPopup = false
// menu.popup(x, y, positioningItem)
if (typeof window !== 'object' || window.constructor !== BrowserWindow) {
if (window != null && (typeof window !== 'object' || window.constructor !== BrowserWindow)) {
// Shift.
positioningItem = y
y = x