From a6794c066d422bff0b1e132ce22fd73fcd9cc56b Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 24 Jul 2025 01:09:24 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9CExpand=20this=20post=E2=80=9D=20?= =?UTF-8?q?link=20including=20user=20`@undefined`=20(#35478)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/picture_in_picture/components/footer.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.tsx b/app/javascript/mastodon/features/picture_in_picture/components/footer.tsx index 080aaca4512..24c88f95050 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.tsx +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.tsx @@ -21,6 +21,7 @@ import { openModal } from 'mastodon/actions/modal'; import { IconButton } from 'mastodon/components/icon_button'; import { useIdentity } from 'mastodon/identity_context'; import { me } from 'mastodon/initial_state'; +import type { Account } from 'mastodon/models/account'; import type { Status } from 'mastodon/models/status'; import { makeGetStatus } from 'mastodon/selectors'; import type { RootState } from 'mastodon/store'; @@ -66,10 +67,7 @@ export const Footer: React.FC<{ const dispatch = useAppDispatch(); const getStatus = useMemo(() => makeGetStatus(), []) as GetStatusSelector; const status = useAppSelector((state) => getStatus(state, { id: statusId })); - const accountId = status?.get('account') as string | undefined; - const account = useAppSelector((state) => - accountId ? state.accounts.get(accountId) : undefined, - ); + const account = status?.get('account') as Account | undefined; const askReplyConfirmation = useAppSelector( (state) => (state.compose.get('text') as string).trim().length !== 0, );