Fix weird bug… I don't even know why url is undefined

pull/79/head
Lim Chee Aun 2023-03-12 19:23:42 +08:00
rodzic c6957f6967
commit 13201260d6
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -1565,6 +1565,7 @@ function _unfurlMastodonLink(instance, url) {
}
function nicePostURL(url) {
if (!url) return;
const urlObj = new URL(url);
const { host, pathname } = urlObj;
const path = pathname.replace(/\/$/, '');