forked from MapComplete/MastodonBot
Add null protection
This commit is contained in:
parent
bef7fd95ce
commit
e897c3b4e8
3 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ export default class OsmUserInfo {
|
|||
const div = document.createElement("div")
|
||||
div.innerHTML = userdata.description
|
||||
const links = Array.from(div.getElementsByTagName("a"))
|
||||
const meLinks = links.filter(link => link.getAttribute("rel").split(" ").indexOf("me") >= 0)
|
||||
const meLinks = links.filter(link => link.getAttribute("rel")?.split(" ")?.indexOf("me") >= 0)
|
||||
return meLinks.map(link => link.href.toString()) //*/
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue