From 2688059dae6b78d0426c25b242e28502a3b5d847 Mon Sep 17 00:00:00 2001 From: starraiderx Date: Tue, 9 Apr 2024 01:48:27 +0200 Subject: [PATCH] 'screenSize' is never reassigned. Use 'const' instead --- src/components/common/BasicScripts.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/BasicScripts.astro b/src/components/common/BasicScripts.astro index 9f4a383..202a1fc 100644 --- a/src/components/common/BasicScripts.astro +++ b/src/components/common/BasicScripts.astro @@ -105,7 +105,7 @@ import { UI } from 'astrowind:config'; newlink.click(); }); - let screenSize = window.matchMedia('(max-width: 767px)'); + const screenSize = window.matchMedia('(max-width: 767px)'); screenSize.addEventListener('change', function () { document.querySelector('[data-aw-toggle-menu]')?.classList.remove('expanded'); document.body.classList.remove('overflow-hidden');