From b211bc517fa7d39a091e1464f728641dd1c7f96a Mon Sep 17 00:00:00 2001 From: novcmbro Date: Thu, 6 Jun 2024 20:18:14 -0300 Subject: [PATCH] fixed updateURL parameter name --- src/js/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/theme.js b/src/js/theme.js index 1e399aa..6c5a7b0 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -13,7 +13,7 @@ const theme = { theme.preferred = () => prefersLightTheme.matches ? "light" : "dark" theme.update = () => { - const updateURL = (element) => theme.name() === "light" ? element.replace("dark", "light") : element.replace("light", "dark") + const updateURL = (url) => theme.name() === "light" ? url.replace("dark", "light") : url.replace("light", "dark") document.querySelectorAll("[name='favicon']").forEach(favicon => favicon.href = updateURL(favicon.href)) rootElement.classList.toggle("light", theme.name() === "light")