Skip to content

Commit

Permalink
fix menubar.ts linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sdirix committed Dec 20, 2024
1 parent 6ef156b commit ba56f3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/widgets/src/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,16 @@ export class MenuBar extends Widget {

/**
* Before setting a new index, this method is used to validate it.
*
*
* By default it checks whether the index is within menu range
* and whether the corresponding menu has at least one item.
*/
protected isValidIndex(index: number): boolean {
return index >= 0 && index < this._menus.length && this._menus[index].items.length > 0;
return (
index >= 0 &&
index < this._menus.length &&
this._menus[index].items.length > 0
);
}

/**
Expand Down

0 comments on commit ba56f3c

Please sign in to comment.