From 5c5f4f7914df6e2393e2c08a1599f6ace3982767 Mon Sep 17 00:00:00 2001 From: shanejonas Date: Wed, 14 Oct 2020 11:45:06 -0700 Subject: [PATCH] fix: default to empty if no tab logs --- src/containers/Inspector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Inspector.tsx b/src/containers/Inspector.tsx index 7dcf133..768b221 100644 --- a/src/containers/Inspector.tsx +++ b/src/containers/Inspector.tsx @@ -239,7 +239,7 @@ const Inspector: React.FC = (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]); } } };