Skip to content

Commit

Permalink
allow with hidden navbar, dont navigate back
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Dec 6, 2024
1 parent 570844a commit 2458aa4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions client/src/components/tabwindow/TabWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,13 @@ class TabWindow extends Component {
playerName = this.props.currentUser.userName;
}

if (this.props.currentTab >= pages.length) {
setTab(0);
}

const hiddenNavbar = this.props.navbarDetails === false && pages.length === 1;

let tabToRender = this.props.currentTab;

// safety check, current tab should never be higher than the amount of tabs
if (this.props.currentTab >= pages.length) {
reportVital(`metrics:errorinfo:tabwindow currentTab is higher than the amount of tabs. Tab: ${this.props.currentTab}, pages: ${pages.length}`);
setTab(0);
tabToRender = 0;
}

Expand Down

0 comments on commit 2458aa4

Please sign in to comment.