Skip to content

Commit

Permalink
Remove nonsensical boolean check (#27787)
Browse files Browse the repository at this point in the history
...as it always evaluates to true
  • Loading branch information
patrickhlauke authored and XhmikosR committed Dec 6, 2018
1 parent fa03289 commit c70b043
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit c70b043

Please sign in to comment.