From 876ce4af7f39dbcbb4c43b2818e038dc0498c6f0 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 2 Jan 2025 17:28:07 -0600 Subject: [PATCH] Fix up types in starter-packs queries --- src/state/queries/starter-packs.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/state/queries/starter-packs.ts b/src/state/queries/starter-packs.ts index 4066f8f192..1edc56ab04 100644 --- a/src/state/queries/starter-packs.ts +++ b/src/state/queries/starter-packs.ts @@ -131,7 +131,7 @@ export function useCreateStarterPackMutation({ return await agent.app.bsky.graph.starterpack.create( { - repo: agent.session?.did, + repo: agent.session?.did!, }, { name, @@ -366,7 +366,10 @@ export async function precacheStarterPack( let starterPackView: AppBskyGraphDefs.StarterPackView | undefined if (AppBskyGraphDefs.isStarterPackView(starterPack)) { starterPackView = starterPack - } else if (AppBskyGraphDefs.isStarterPackViewBasic(starterPack)) { + } else if ( + AppBskyGraphDefs.isStarterPackViewBasic(starterPack) && + AppBskyGraphStarterpack.isValidRecord(starterPack.record) + ) { const listView: AppBskyGraphDefs.ListViewBasic = { uri: starterPack.record.list, // This will be populated once the data from server is fetched