Skip to content

Commit

Permalink
fix: optional meta
Browse files Browse the repository at this point in the history
  • Loading branch information
justypist committed Jun 19, 2024
1 parent d96d569 commit 406f87e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export function useSwitchTheme() {

const query = window.matchMedia("(prefers-color-scheme: dark)");
meta.setAttribute("content", query.matches ? "#000000" : "#FFFFFF");
query.addEventListener("change", (e) => {
meta.setAttribute("content", query.matches ? "#000000" : "#FFFFFF");
query.addEventListener("change", () => {
meta?.setAttribute("content", query.matches ? "#000000" : "#FFFFFF");
});
} else {
const themeColor = getCSSVar("--theme-color");
Expand Down

0 comments on commit 406f87e

Please sign in to comment.