diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 1d7ad43d5..2c3c0327d 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -90,6 +90,9 @@ export function TabsProvider({ children }: { children: ReactNode }) { if (cookie && Object.keys(templates).length > 0) { let cookieObject: LangFlowState = JSON.parse(cookie); cookieObject.flows.forEach((flow) => { + if (!flow.data) { + return; + } flow.data.edges.forEach((edge) => { edge.className = ""; edge.style = { stroke: "#555555" };