Skip to content

Commit

Permalink
fix: default to empty if no tab logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Oct 14, 2020
1 parent 9131b71 commit 5c5f4f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/containers/Inspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const Inspector: React.FC<IProps> = (props) => {
const newHistory: any = [...requestHistory, { ...tabs[tabIndex] }];
setRequestHistory(newHistory);
setLogs((prevLogs) => [...prevLogs, reqObj, resObj]);
setTabLogs(tabIndex, [...tabs[tabIndex].logs, reqObj, resObj]);
setTabLogs(tabIndex, [...(tabs[tabIndex].logs || []), reqObj, resObj]);
}
}
};
Expand Down

0 comments on commit 5c5f4f7

Please sign in to comment.