File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
client/src/components/tabwindow Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,21 @@ class TabWindow extends Component {
61
61
62
62
const hiddenNavbar = this . props . navbarDetails === false && pages . length === 1 ;
63
63
64
+ let tabToRender = this . props . currentTab ;
65
+
64
66
// safety check, current tab should never be higher than the amount of tabs
65
67
if ( this . props . currentTab >= pages . length ) {
66
68
reportVital ( `metrics:errorinfo:tabwindow currentTab is higher than the amount of tabs. Tab: ${ this . props . currentTab } , pages: ${ pages . length } ` ) ;
67
69
setTab ( 0 ) ;
70
+ tabToRender = 0 ;
68
71
}
69
72
70
73
return (
71
74
< div className = "flex flex-col-reverse bg-gray-800 bg-opacity-25 text-white h-screen w-screen" >
72
75
< main className = "flex justify-center overflow-x-hidden overflow-y-auto w-full h-full backdrop-blur" >
73
76
< div className = "content-wrapper" >
74
77
< ServerConnectionWarning />
75
- { pages [ this . props . currentTab ] . content }
78
+ { pages [ tabToRender ] . content }
76
79
</ div >
77
80
</ main >
78
81
You can’t perform that action at this time.
0 commit comments