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);
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);