🐛 fix(tabsContext.tsx): handle null or undefined flow.description to prevent potential errors

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-21 12:57:08 -03:00
commit ddd480fb23

View file

@ -584,7 +584,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
flowData: ReactFlowJsonObject | null,
flow: FlowType
) => ({
description: flow.description ?? getRandomDescription(),
description: flow?.description ?? getRandomDescription(),
name: flow?.name ?? getRandomName(),
data: flowData,
id: "",