Condensed convoluted ternary

This commit is contained in:
Adam Lui 2025-05-06 22:57:53 -07:00 committed by GitHub
parent 49e05d9f2b
commit 0c429fb0f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,10 +178,6 @@ export function createAccountFromServerJSON(serverJSON: ApiAccountJSON) {
), ),
note_emojified: emojify(accountJSON.note, emojiMap), note_emojified: emojify(accountJSON.note, emojiMap),
note_plain: unescapeHTML(accountJSON.note), note_plain: unescapeHTML(accountJSON.note),
url: url: accountJSON[/^https?:\/\//.test(accountJSON.url) ? 'url' : 'uri'],
accountJSON.url.startsWith('http://') ||
accountJSON.url.startsWith('https://')
? accountJSON.url
: accountJSON.uri,
}); });
} }