diff --git a/src/state/queries/postgate/index.ts b/src/state/queries/postgate/index.ts index 5cfff7f0ed..ee7c3aa2d8 100644 --- a/src/state/queries/postgate/index.ts +++ b/src/state/queries/postgate/index.ts @@ -129,8 +129,8 @@ export function usePostgateQuery({postUri}: {postUri: string}) { const agent = useAgent() return useQuery({ queryKey: createPostgateQueryKey(postUri), - queryFn() { - return getPostgateRecord({agent, postUri}) + async queryFn() { + return (await getPostgateRecord({agent, postUri})) ?? null }, }) }