diff --git a/packages/web_ui/src/components/AssignInstanceModal.tsx b/packages/web_ui/src/components/AssignInstanceModal.tsx index f6525522..6749cb55 100644 --- a/packages/web_ui/src/components/AssignInstanceModal.tsx +++ b/packages/web_ui/src/components/AssignInstanceModal.tsx @@ -26,14 +26,14 @@ export default function AssignInstanceModal(props: AssignInstanceModalProps) { let control = useContext(ControlContext); function handleAssign() { - let hostId = form.getFieldValue("host"); + let hostId: number | string | undefined = form.getFieldValue("host"); if (hostId === undefined) { setOpen(false); return; } - if (hostId === "null") { - hostId = null; + if (typeof hostId === "string") { + hostId = undefined; } setApplying(true);