diff --git a/js/main.js b/js/main.js index 3a49f29..6bfeb05 100644 --- a/js/main.js +++ b/js/main.js @@ -118,7 +118,6 @@ let isActive = (e) => { dropDown.classList.toggle("is-active"); icon.classList = "fas fa-angle-up"; } else { - optionSelected(); closeDropdown(); } }; @@ -126,7 +125,8 @@ let isActive = (e) => { // Option function selected let optionSelected = (e) => { - if (option) { + if (e.target === option) { + dropDown.classList.remove("is-active"); icon.classList = "fas fa-angle-down"; } };