Skip to content

Commit

Permalink
dropdown.js: simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Nov 3, 2020
1 parent 3b64580 commit 6d6cb93
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,9 @@ class Dropdown {

// Handle dropup
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
placement = PLACEMENT_TOP
if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_TOPEND
}
placement = this._menu.classList.contains(CLASS_NAME_MENURIGHT) ?
PLACEMENT_TOPEND :
PLACEMENT_TOP
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
Expand Down

0 comments on commit 6d6cb93

Please sign in to comment.