From 41f2d203c36233e2261422a42e5d141bcb00e8d6 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 27 Aug 2026 19:06:58 +0300 Subject: [PATCH] Handle AppView errors after quote posts (#11579) --- src/view/com/composer/Composer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 8738b1e1ed..4a60efa4f0 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -1213,7 +1213,7 @@ export const ComposePost = ({ if (initQuote) { // We want to wait for the quote count to update before we call `onPost`, which will refetch data void whenAppViewReady(client, initQuote.uri, res => { - const anchor = res.thread.at(0) + const anchor = res?.thread.at(0) if ( bsky.isType(app.bsky.unspecced.defs.threadItemPost, anchor?.value) && anchor.value.post.quoteCount !== initQuote.quoteCount @@ -2478,7 +2478,9 @@ function useKeyboardVerticalOffset() { async function whenAppViewReady( client: Client, uri: string, - fn: (res: app.bsky.unspecced.getPostThreadV2.$OutputBody) => boolean, + fn: ( + res: app.bsky.unspecced.getPostThreadV2.$OutputBody | undefined, + ) => boolean, ) { await until( 5, // 5 tries