'screenSize' is never reassigned. Use 'const' instead

This commit is contained in:
starraiderx
2024-04-09 01:48:27 +02:00
parent cbe06266c2
commit 2688059dae

View File

@@ -105,7 +105,7 @@ import { UI } from 'astrowind:config';
newlink.click(); newlink.click();
}); });
let screenSize = window.matchMedia('(max-width: 767px)'); const screenSize = window.matchMedia('(max-width: 767px)');
screenSize.addEventListener('change', function () { screenSize.addEventListener('change', function () {
document.querySelector('[data-aw-toggle-menu]')?.classList.remove('expanded'); document.querySelector('[data-aw-toggle-menu]')?.classList.remove('expanded');
document.body.classList.remove('overflow-hidden'); document.body.classList.remove('overflow-hidden');