diff options
author | mountainbug95 <tannersmithtn95@gmail.com> | 2019-10-01 23:41:26 +0300 |
---|---|---|
committer | mountainbug95 <tannersmithtn95@gmail.com> | 2019-10-01 23:41:26 +0300 |
commit | 3f33f4b6b127de3c56393bd0e303c15177eddb4f (patch) | |
tree | a1c86c0fab3a61fbce6e394a393aedb76659f067 | |
parent | a0cf988d95dcac2facb13d38df3412e858e969eb (diff) |
Fix var redeclaration conflicts in js
-rw-r--r-- | assets/js/toggleLogos.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/assets/js/toggleLogos.js b/assets/js/toggleLogos.js index c3f8d7a..cc9b135 100644 --- a/assets/js/toggleLogos.js +++ b/assets/js/toggleLogos.js @@ -1,14 +1,14 @@ window.addEventListener("resize", toggleLogo); -let listRemoveWidth = window.matchMedia("(max-width: 735px)"); -let listAddWidth = window.matchMedia("(min-width: 735px)"); +let lrw = window.matchMedia("(max-width: 735px)"); +let law = window.matchMedia("(min-width: 735px)"); function toggleLogo(){ - if (listRemoveWidth.matches) { + if (lrw.matches) { document.getElementById("logo-mobile").classList.remove("hidden"); document.getElementById("logo-desktop").classList.add("hidden"); } - else if (listAddWidth.matches) { + else if (law.matches) { document.getElementById("logo-mobile").classList.add("hidden"); document.getElementById("logo-desktop").classList.remove("hidden"); } |