mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 17:25:40 +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) {
|
||||
if (!url) return;
|
||||
const urlObj = new URL(url);
|
||||
const { host, pathname } = urlObj;
|
||||
const path = pathname.replace(/\/$/, '');
|
||||
|
|
Loading…
Reference in a new issue