1
0
Fork 0

Port domain format from Trending

This commit is contained in:
Lim Chee Aun 2023-11-04 15:35:28 +08:00
parent 8c8ff72e53
commit 7ad6151637

View file

@ -1714,7 +1714,9 @@ function Card({ card, instance }) {
if (snapStates.unfurledLinks[url]) return null;
if (hasText && (image || (type === 'photo' && blurhash))) {
const domain = new URL(url).hostname.replace(/^www\./, '');
const domain = new URL(url).hostname
.replace(/^www\./, '')
.replace(/\/$/, '');
let blurhashImage;
if (!image) {
const w = 44;