Fix JS error

pull/1008/head
Zef Hemel 2024-07-31 13:06:10 +02:00
parent 0d5cb25ad2
commit 357a50f820
1 changed files with 1 additions and 1 deletions

View File

@ -1111,7 +1111,7 @@ export class Client {
const bodyEl = this.parent.parentElement; const bodyEl = this.parent.parentElement;
if (bodyEl) { if (bodyEl) {
bodyEl.removeAttribute("class"); bodyEl.removeAttribute("class");
if (enrichedMeta.pageDecoration.cssClasses) { if (enrichedMeta.pageDecoration?.cssClasses) {
bodyEl.className = enrichedMeta.pageDecoration.cssClasses.join(" ") bodyEl.className = enrichedMeta.pageDecoration.cssClasses.join(" ")
.replaceAll(/[^a-zA-Z0-9-_ ]/g, ""); .replaceAll(/[^a-zA-Z0-9-_ ]/g, "");
} }