mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 23:31:19 +03:00
Fix weird bug… I don't even know why url is undefined
This commit is contained in:
parent
c6957f6967
commit
13201260d6
1 changed files with 1 additions and 0 deletions
|
@ -1565,6 +1565,7 @@ function _unfurlMastodonLink(instance, url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function nicePostURL(url) {
|
function nicePostURL(url) {
|
||||||
|
if (!url) return;
|
||||||
const urlObj = new URL(url);
|
const urlObj = new URL(url);
|
||||||
const { host, pathname } = urlObj;
|
const { host, pathname } = urlObj;
|
||||||
const path = pathname.replace(/\/$/, '');
|
const path = pathname.replace(/\/$/, '');
|
||||||
|
|
Loading…
Add table
Reference in a new issue