From 18159442716ab01da63a373dcacf97791dcf0e57 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Mon, 7 Oct 2024 12:51:56 -0400 Subject: [PATCH] Avoid arrow function --- .../src/arches_lingo/components/header/DarkModeToggle.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arches_lingo/src/arches_lingo/components/header/DarkModeToggle.vue b/arches_lingo/src/arches_lingo/components/header/DarkModeToggle.vue index 2b0a61d5..dc770bf9 100644 --- a/arches_lingo/src/arches_lingo/components/header/DarkModeToggle.vue +++ b/arches_lingo/src/arches_lingo/components/header/DarkModeToggle.vue @@ -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; -}; +}