refactor: prevent duplicated title for index page by making prop optional

This commit is contained in:
Danny Koppenhagen
2023-06-19 20:35:58 +02:00
committed by Stefan Rotsch
parent 810db6aea6
commit 0d2265c57e
5 changed files with 19 additions and 14 deletions

View File

@@ -56,9 +56,9 @@ const createStaticFiles = async () => {
const document = dom.window.document;
const rootEl = document.getElementById("root");
document.title = 'test'
document.title = "test";
setTitle(document, item.title)
setTitle(document, item.title);
if (rootEl) {
const textNode = document.createElement("div");