From da061430b3158b28d121769f8b25dc11f84cb0f2 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 20 Nov 2024 18:23:17 +0000 Subject: [PATCH] fix: types --- src/server/api/routers/list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)