diff --git a/packages/app/utils/trpc/patterns.ts b/packages/app/utils/trpc/patterns.ts index 3eea8c1e6..b24a323c3 100644 --- a/packages/app/utils/trpc/patterns.ts +++ b/packages/app/utils/trpc/patterns.ts @@ -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 = {