diff --git a/js/src/dropdown.js b/js/src/dropdown.js index ac79ce04df..42f4f6de4d 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -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)) {