Check that window is non-null before accessing constructor prop
This commit is contained in:
parent
5819acbc20
commit
3e05350d6b
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||||
let asyncPopup = false
|
let asyncPopup = false
|
||||||
|
|
||||||
// menu.popup(x, y, positioningItem)
|
// menu.popup(x, y, positioningItem)
|
||||||
if (typeof window !== 'object' || window.constructor !== BrowserWindow) {
|
if (window != null && (typeof window !== 'object' || window.constructor !== BrowserWindow)) {
|
||||||
// Shift.
|
// Shift.
|
||||||
positioningItem = y
|
positioningItem = y
|
||||||
y = x
|
y = x
|
||||||
|
|
Loading…
Reference in a new issue