From 89d5b7b6adf7fa7e0329b33faf65b85e03b6e614 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Wed, 7 Jan 2026 13:52:25 -0800 Subject: [PATCH] Fix typecheck errors --- packages/desktop-client/src/budget/mutations.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/desktop-client/src/budget/mutations.ts b/packages/desktop-client/src/budget/mutations.ts index a19fefc344..e2276fd7f4 100644 --- a/packages/desktop-client/src/budget/mutations.ts +++ b/packages/desktop-client/src/budget/mutations.ts @@ -149,9 +149,8 @@ export function useSaveCategoryMutation() { return useMutation({ mutationFn: async ({ category }: SaveCategoryPayload) => { - const { grouped: categoryGroups } = await queryClient.ensureQueryData( - categoryQueries.list(), - ); + const { grouped: categoryGroups = [] } = + await queryClient.ensureQueryData(categoryQueries.list()); const group = categoryGroups.find(g => g.id === category.group); const categoriesInGroup = group?.categories ?? []; @@ -299,7 +298,7 @@ export function useReorderCategoryMutation() { return useMutation({ mutationFn: async ({ id, groupId, targetId }: ReoderCategoryPayload) => { - const { grouped: categoryGroups, list: categories } = + const { grouped: categoryGroups = [], list: categories = [] } = await queryClient.ensureQueryData(categoryQueries.list()); const moveCandidate = categories.filter(c => c.id === id)[0];