Throw an error if menu.popup() has no window
This commit is contained in:
parent
5a25b88b50
commit
9c56b81b71
1 changed files with 3 additions and 3 deletions
|
@ -60,9 +60,9 @@ Menu.prototype.popup = function (options) {
|
||||||
window = BrowserWindow.getFocusedWindow()
|
window = BrowserWindow.getFocusedWindow()
|
||||||
if (!window && wins && wins.length > 0) {
|
if (!window && wins && wins.length > 0) {
|
||||||
window = wins[0]
|
window = wins[0]
|
||||||
if (!window) {
|
}
|
||||||
throw new Error(`Cannot open Menu without a BrowserWindow present`)
|
if (!window) {
|
||||||
}
|
throw new Error(`Cannot open Menu without a BrowserWindow present`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue