From 83466bcf14bfc3ebe2c00c98df4b7916e87342f7 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 25 Dec 2023 20:52:03 -0600 Subject: [PATCH] Use globalThis.setTimeout --- themes/default/assets/js/theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/default/assets/js/theme.js b/themes/default/assets/js/theme.js index 9caa943..18c5a45 100644 --- a/themes/default/assets/js/theme.js +++ b/themes/default/assets/js/theme.js @@ -24,10 +24,10 @@ const initHandler = (document, element) => { const toggleTheme = (document) => { const colorScheme = activeColorScheme === 'dark' ? 'light' : 'dark' document.querySelector('html').classList.add('theme-transistion') - setTimeout(() => { + globalThis.setTimeout(() => { setTheme(document, colorScheme) }, 0) - setTimeout(() => { + globalThis.setTimeout(() => { document.querySelector('html').classList.remove('theme-transistion') }, 2000) }