Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Sep 29, 2024
1 parent d326a68 commit 461fcc4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/src/components/tabwindow/TabWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { msg } from '../../client/OpenAudioAppContainer';
import ServerConnectionWarning from '../connectionwarning/ServerConnectionWarning';
import UserAvatar from '../avatar/UserAvatar';
import { HamburgerSvg } from '../icons/hamburger';
import { reportVital } from '../../client/util/vitalreporter';

export const setTab = (tab) => {
setGlobalState({
Expand Down Expand Up @@ -60,6 +61,12 @@ class TabWindow extends Component {

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

// 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);
}

return (
<div className="flex flex-col-reverse bg-gray-800 bg-opacity-25 text-white h-screen w-screen">
<main className="flex justify-center overflow-x-hidden overflow-y-auto w-full h-full backdrop-blur">
Expand Down

0 comments on commit 461fcc4

Please sign in to comment.