Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2020-11-03 17:43:20 +0300
committerGitHub <noreply@github.com>2020-11-03 17:43:20 +0300
commitb864973a9485eda46363a5d8daa4e5a78ecce53f (patch)
tree3b96cdc2f9232176d255998d32234da07b56867f /js
parentccac6a62197939390ca55eea5aaa60324107d876 (diff)
dropdown.js: simplify code (#32055)
Diffstat (limited to 'js')
-rw-r--r--js/src/dropdown.js7
1 files changed, 3 insertions, 4 deletions
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)) {