Skip to content

Commit

Permalink
fix sentry crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3orblade committed Dec 30, 2023
1 parent d626c7e commit 20b9486
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ts/component/menu/smile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,13 @@ class MenuSmile extends React.Component<I.Menu, State> {
return;
};

if ((this.coll > current.children.length) || (current.children[this.coll].itemId == ID_BLANK)) {
const child = current.children[this.coll];

if ((this.coll > current.children.length) || (child && (child.itemId == ID_BLANK))) {
this.coll = 0;
};

this.setActive(current.children[this.coll], this.row);
this.setActive(child, this.row);
};

onArrowHorizontal (dir: number) {
Expand Down

0 comments on commit 20b9486

Please sign in to comment.