mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
Check that window is non-null before accessing constructor prop
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user