update type to avoid undefined
This commit is contained in:
parent
bf568ad22f
commit
cea8acacd8
1 changed files with 5 additions and 5 deletions
|
|
@ -15,11 +15,11 @@ export default function FlowSettingsModal({
|
||||||
const { flows, tabId, updateFlow, saveFlow } = useContext(TabsContext);
|
const { flows, tabId, updateFlow, saveFlow } = useContext(TabsContext);
|
||||||
const flow = flows.find((f) => f.id === tabId);
|
const flow = flows.find((f) => f.id === tabId);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setName(flow.name);
|
setName(flow!.name);
|
||||||
setDescription(flow.description);
|
setDescription(flow!.description);
|
||||||
}, [flow.name, flow.description]);
|
}, [flow!.name, flow!.description]);
|
||||||
const [name, setName] = useState(flow.name);
|
const [name, setName] = useState(flow!.name);
|
||||||
const [description, setDescription] = useState(flow.description);
|
const [description, setDescription] = useState(flow!.description);
|
||||||
const [invalidName, setInvalidName] = useState(false);
|
const [invalidName, setInvalidName] = useState(false);
|
||||||
|
|
||||||
function handleClick(): void {
|
function handleClick(): void {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue