Fix unassigning instances broken in Web UI

This commit is contained in:
Hornwitser committed 2024-01-11 01:21:35 +01:00
1 parent 880216b775
commit b976de926b
1 file changed
+3 -3
@@ -26,14 +26,14 @@ export default function AssignInstanceModal(props: AssignInstanceModalProps) {
let control = useContext(ControlContext); let control = useContext(ControlContext);
function handleAssign() { function handleAssign() {
let hostId = form.getFieldValue("host"); let hostId: number | string | undefined = form.getFieldValue("host");
if (hostId === undefined) { if (hostId === undefined) {
setOpen(false); setOpen(false);
return; return;
} }
if (hostId === "null") { if (typeof hostId === "string") {
hostId = null; hostId = undefined;
} }
setApplying(true); setApplying(true);