Skip to content

Commit

Permalink
Avoid arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Oct 7, 2024
1 parent 842208b commit 1815944
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ const isDarkModeEnabled = ref(
window.matchMedia("(prefers-color-scheme: dark)").matches,
);
const toggleDarkMode = () => {
function toggleDarkMode() {
const element = document.querySelector("html");
// Remove the leading dot from the selector to get class name.
element!.classList.toggle(
DEFAULT_THEME.theme.options.darkModeSelector.substring(1),
);
isDarkModeEnabled.value = !isDarkModeEnabled.value;
};
}
</script>

<template>
Expand Down

0 comments on commit 1815944

Please sign in to comment.