diff --git a/package.json b/package.json index a519a2f..377ebc0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fwdekker/template", - "version": "3.3.9", + "version": "3.3.10", "description": "The base template for pages on fwdekker.com.", "author": "Florine W. Dekker", "license": "MIT", diff --git a/src/main/js/Template.ts b/src/main/js/Template.ts index 542c457..a614fca 100644 --- a/src/main/js/Template.ts +++ b/src/main/js/Template.ts @@ -243,7 +243,8 @@ function footerLink(prefix: string, text: string | null | undefined, url: string * not a valid value as a parameter for that function, its value is considered `undefined`. */ doAfterLoad(() => { - $("html")!.dataset["theme"] = "light"; + const html = $("html")!; + if (html.dataset["theme"] == null) html.dataset["theme"] = "light"; const navTarget = $(getMetaProperty("fwd:nav:target")); if (navTarget != null) {