Queries can't save undefined

This commit is contained in:
Eric Bailey
2024-08-12 14:54:56 -05:00
parent 6e280b7737
commit 1aba70cd18
+2 -2
View File
@@ -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
},
})
}