Skip to content

Commit

Permalink
Merge pull request #146 from llamux/patch-1
Browse files Browse the repository at this point in the history
Fix error for trpc empty pattern with null and undefined
  • Loading branch information
albbus-stack authored Apr 27, 2024
2 parents 3816208 + d0bad53 commit 8f7ab4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/app/utils/trpc/patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const loading = {
}

export const empty = {
data: P.when((data: []) => data.length === 0 || data === null || data === undefined),
data: P.when(
(data: null | undefined | []) => data === null || data === undefined || data.length === 0,
),
}

export const success = {
Expand Down

1 comment on commit 8f7ab4d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔ EAS production build completed

  • 🤖 Android build failed ❌
  • 🍏 IOS build failed ❌
Android QR IOS QR

Please sign in to comment.