diff options
author | Patrick H. Lauke <redux@splintered.co.uk> | 2018-12-06 14:30:12 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2018-12-06 14:30:12 +0300 |
commit | c70b043a76764b842c732417fb32325ae2d1ac56 (patch) | |
tree | 3d66b02085eceb95b86720a8cb3805e9a108cddd /js/src/dropdown.js | |
parent | fa03289d1381247b1ce72cdbd7424fbf4bfb493a (diff) |
Remove nonsensical boolean check (#27787)
...as it always evaluates to true
Diffstat (limited to 'js/src/dropdown.js')
-rw-r--r-- | js/src/dropdown.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index d8fe5fdba1..0c13b2c5eb 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -468,8 +468,7 @@ class Dropdown { const parent = Dropdown._getParentFromElement(this) const isActive = $(parent).hasClass(ClassName.SHOW) - if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || - isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { + if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { if (event.which === ESCAPE_KEYCODE) { const toggle = parent.querySelector(Selector.DATA_TOGGLE) $(toggle).trigger('focus') |