Fix weird bug… I don't even know why url is undefined
This commit is contained in:
parent
c6957f6967
commit
13201260d6
|
@ -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(/\/$/, '');
|
||||
|
|
Loading…
Reference in a new issue