diff --git a/src/server/api/routers/list.ts b/src/server/api/routers/list.ts index c460fda5..e78b4c38 100644 --- a/src/server/api/routers/list.ts +++ b/src/server/api/routers/list.ts @@ -54,7 +54,7 @@ export const listRouter = createTRPCRouter({ createdBy: userId, boardId: board.id, index: - latestListIndex || latestListIndex === 0 ? latestListIndex + 1 : 0, + (latestListIndex ?? latestListIndex === 0) ? latestListIndex + 1 : 0, }); if (!result)