2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

dropdown.js: switch to a ternary

This commit is contained in:
XhmikosR
2020-05-08 17:28:43 +03:00
parent 5f79b75ea8
commit 1c9e203c52
+3 -4
View File
@@ -281,10 +281,9 @@ class Dropdown {
// Handle dropup
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
placement = PLACEMENT_TOP
if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_TOPEND
}
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT)
? PLACEMENT_TOPEND
: PLACEMENT_TOP
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {