mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
🔧 Fix value shift
This commit is contained in:
@@ -48,11 +48,8 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
let opts
|
||||
|
||||
// menu.popup(x, y, positioningItem)
|
||||
if (!window) {
|
||||
// shift over values
|
||||
if (typeof window !== 'object' || window.constructor !== BrowserWindow) {
|
||||
[newPosition, newY, newX, newWindow] = [y, x, window, null]
|
||||
}
|
||||
if (window && typeof window !== 'object' || window.constructor !== BrowserWindow) {
|
||||
[newPosition, newY, newX, newWindow] = [y, x, window, null]
|
||||
}
|
||||
|
||||
// menu.popup({})
|
||||
|
||||
Reference in New Issue
Block a user