Skip to content

Commit

Permalink
Fixes custom-inputs clearing on save (calcom#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
emrysal authored Oct 9, 2021
1 parent f03a2c2 commit 014b74b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/api/availability/eventtype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 014b74b

Please sign in to comment.