don't run replace() on null

This commit is contained in:
Vipra 2023-07-21 10:26:53 +02:00 committed by Jasmin
parent e518c4d4bc
commit a8904497c0

View file

@ -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;
}
/**