mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-25 04:50:18 +00:00
don't run replace() on null
This commit is contained in:
parent
e518c4d4bc
commit
a8904497c0
1 changed files with 2 additions and 1 deletions
|
@ -241,7 +241,8 @@ async function addProplate(element) {
|
|||
//if we couldn't get an id from the div try the closest article
|
||||
id = element.closest("article[data-id]")?.dataset.id;
|
||||
}
|
||||
return id.replace("f-", "");
|
||||
if (id) id = id.replace("f-", "");
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue