Skip to content

Commit

Permalink
fix: Cannot read properties of undefined (reading 'total')
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaumaus committed Jan 6, 2025
1 parent 4ff732c commit 0e5ea33
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/apps/cloud/src/project/project.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1933,10 +1933,8 @@ export class ProjectService {
})

// eslint-disable-next-line no-await-in-loop
const [{ total: chunkTotal }] = await countResult.json<{
total: number
}>()
total += chunkTotal
const countData = await countResult.json<{ total: number }>()
total += countData[0]?.total || 0
}

// Apply pagination to combined results
Expand Down

0 comments on commit 0e5ea33

Please sign in to comment.