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