Queries can't save undefined
This commit is contained in:
@@ -129,8 +129,8 @@ export function usePostgateQuery({postUri}: {postUri: string}) {
|
|||||||
const agent = useAgent()
|
const agent = useAgent()
|
||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: createPostgateQueryKey(postUri),
|
queryKey: createPostgateQueryKey(postUri),
|
||||||
queryFn() {
|
async queryFn() {
|
||||||
return getPostgateRecord({agent, postUri})
|
return (await getPostgateRecord({agent, postUri})) ?? null
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user