diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-06-19 19:25:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-19 09:25:17 -0700 |
commit | d53fdb0dda528f0f70ed34f580c8bf64ec6b1d39 (patch) | |
tree | e4c72467ef344930cdc16c0c31d3f312b1d19e74 /src/state | |
parent | 9be3b0794c9ed6cd4e80651c03175f79566ba065 (diff) | |
download | voidsky-d53fdb0dda528f0f70ed34f580c8bf64ec6b1d39.tar.zst |
fix prefetch returning undefined (#8538)
Diffstat (limited to 'src/state')
-rw-r--r-- | src/state/queries/postgate/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/state/queries/postgate/index.ts b/src/state/queries/postgate/index.ts index 346e7bfe2..8c86dc017 100644 --- a/src/state/queries/postgate/index.ts +++ b/src/state/queries/postgate/index.ts @@ -2,10 +2,10 @@ import React from 'react' import { AppBskyEmbedRecord, AppBskyEmbedRecordWithMedia, - AppBskyFeedDefs, + type AppBskyFeedDefs, AppBskyFeedPostgate, AtUri, - BskyAgent, + type BskyAgent, } from '@atproto/api' import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query' @@ -139,7 +139,7 @@ export function usePostgateQuery({postUri}: {postUri: string}) { staleTime: STALE.SECONDS.THIRTY, queryKey: createPostgateQueryKey(postUri), async queryFn() { - return (await getPostgateRecord({agent, postUri})) ?? null + return await getPostgateRecord({agent, postUri}).then(res => res ?? null) }, }) } |