refactor: replace .indexOf() with .includes() (#39195)
This commit is contained in:
parent
9cd5de7588
commit
2c52eb7e1c
5 changed files with 5 additions and 5 deletions
|
@ -82,7 +82,7 @@ Menu.prototype.popup = function (options = {}) {
|
|||
|
||||
// find which window to use
|
||||
const wins = BaseWindow.getAllWindows();
|
||||
if (!wins || wins.indexOf(window as any) === -1) {
|
||||
if (!wins || !wins.includes(window as any)) {
|
||||
window = BaseWindow.getFocusedWindow() as any;
|
||||
if (!window && wins && wins.length > 0) {
|
||||
window = wins[0] as any;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue