From cea8acacd8dbec94a90627b53846694864d5d89e Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 24 Aug 2023 19:42:48 -0300 Subject: [PATCH] update type to avoid undefined --- src/frontend/src/modals/flowSettingsModal/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/modals/flowSettingsModal/index.tsx b/src/frontend/src/modals/flowSettingsModal/index.tsx index ed91f5dbb..7729f78fe 100644 --- a/src/frontend/src/modals/flowSettingsModal/index.tsx +++ b/src/frontend/src/modals/flowSettingsModal/index.tsx @@ -15,11 +15,11 @@ export default function FlowSettingsModal({ const { flows, tabId, updateFlow, saveFlow } = useContext(TabsContext); const flow = flows.find((f) => f.id === tabId); useEffect(() => { - setName(flow.name); - setDescription(flow.description); - }, [flow.name, flow.description]); - const [name, setName] = useState(flow.name); - const [description, setDescription] = useState(flow.description); + setName(flow!.name); + setDescription(flow!.description); + }, [flow!.name, flow!.description]); + const [name, setName] = useState(flow!.name); + const [description, setDescription] = useState(flow!.description); const [invalidName, setInvalidName] = useState(false); function handleClick(): void {