]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Dropdown: fix variable always evaluating to true (#31673)
authorXhmikosR <xhmikosr@gmail.com>
Fri, 18 Sep 2020 07:22:24 +0000 (10:22 +0300)
committerGitHub <noreply@github.com>
Fri, 18 Sep 2020 07:22:24 +0000 (10:22 +0300)
js/src/dropdown.js

index 8cfa5564ab44c8f0361e71af0116f4dd67e69297..5e3ed4c56e64637d88cf9112888f44d1276d2cf0 100644 (file)
@@ -469,7 +469,7 @@ class Dropdown {
     event.preventDefault()
     event.stopPropagation()
 
-    if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
+    if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
       if (event.which === ESCAPE_KEYCODE) {
         $(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')
       }