Skip to content

Commit bdcc79c

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Migrated to typescript maincontainer.
still has ts no check because of class component ts rendering error
1 parent 9ce3f5b commit bdcc79c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/containers/MainContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function MainContainer(): JSX.Element {
5858
let maxTab: number;
5959
if (!sourceTab) {
6060
const tabsArray: Array<string> = Object.keys(payload);
61-
maxTab = Math.max(...tabsArray);
61+
const numTabsArray: number[] = tabsArray.map(tab => Number(tab));
62+
maxTab = Math.max(...numTabsArray);
6263
}
6364
switch (action) {
6465
case 'deleteTab': {

0 commit comments

Comments
 (0)