From fc7d8c35abfd0cfe1f6726c1e7b6712ff088dadb Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 7 Aug 2024 13:25:13 -0500 Subject: [PATCH] Improve status lookup from search --- src/app/components/stream/thread/thread.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/stream/thread/thread.component.ts b/src/app/components/stream/thread/thread.component.ts index 7a6a98bc..7429e7ff 100644 --- a/src/app/components/stream/thread/thread.component.ts +++ b/src/app/components/stream/thread/thread.component.ts @@ -167,8 +167,8 @@ export class ThreadComponent extends BrowseBase { return this.mastodonService.search(currentAccount, status.uri, version, true); }) .then((result: Results) => { - if (result.statuses.length === 1) { - const retrievedStatus = result.statuses[0]; + const retrievedStatus = result.statuses.find(({ uri }) => uri === status.uri); + if (retrievedStatus) { return retrievedStatus; } throw new Error('could not find status');