1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix link matching crashes

This commit is contained in:
xmflsct
2023-02-06 14:00:40 +01:00
parent 9f6e7738bf
commit 1dd64c4e19
4 changed files with 14 additions and 17 deletions

View File

@@ -46,17 +46,9 @@ const openLink = async (url: string, navigation?: any) => {
// If an account can be found
if (match?.account) {
if (!match.account._remote && match.account.id) {
handleNavigation('Tab-Shared-Account', { account: match.account.id })
return
}
let response: Mastodon.Account | undefined = undefined
const queryKey: QueryKeyAccount = [
'Account',
{ id: match.account.id, url: url, _remote: match.account._remote }
]
const queryKey: QueryKeyAccount = ['Account', { url: url, _remote: match.account._remote }]
const cache = queryClient.getQueryData<Mastodon.Status>(queryKey)
if (cache) {