Scheduling infrastructure for absolutely everyone.
Fixes custom-inputs clearing on save (#890)
Alex van Andel014b74be8c27
diff --git a/pages/api/availability/eventtype.ts b/pages/api/availability/eventtype.tsindex afa8588f914..188b04b6d38 100644--- a/pages/api/availability/eventtype.ts+++ b/pages/api/availability/eventtype.ts@@ -5,7 +5,7 @@ import { getSession } from "@lib/auth";import prisma from "@lib/prisma";function handleCustomInputs(customInputs: EventTypeCustomInput[], eventTypeId: number) {- if (!customInputs || customInputs?.length) return undefined;+ if (!customInputs || !customInputs?.length) return undefined;const cInputsIdsToDelete = customInputs.filter((input) => input.id > 0).map((e) => e.id);const cInputsToCreate = customInputs.filter((input) => input.id < 0)