Skip to content

Commit

Permalink
avoid console warning when hitting number keys beyond pins (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored Jun 8, 2024
1 parent 531d248 commit c0c4f82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ Menu.prototype.togglePinEntry = function (id) {
};

Menu.prototype.selectPin = function (num) {
if (num >= this.$pinList.children.length) return;
document.location = this.$pinList.children[num].children[0].href;
};

Expand Down
1 change: 1 addition & 0 deletions test/baselines/generated-reference/assets-inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@
};
Menu.prototype.selectPin = function (num) {
if (num >= this.$pinList.children.length) return;
document.location = this.$pinList.children[num].children[0].href;
};
Expand Down

0 comments on commit c0c4f82

Please sign in to comment.