diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-05-08 17:28:43 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-05-12 19:21:36 +0300 |
commit | 1c9e203c52276b4a42cb38f0babf56cd62fefe3a (patch) | |
tree | a6d866a1e9261f0da906779d054fc15a393133ae /js/src/dropdown.js | |
parent | 5f79b75ea8a086841f8aa76f1db6d6c830b98465 (diff) |
dropdown.js: switch to a ternary
Diffstat (limited to 'js/src/dropdown.js')
-rw-r--r-- | js/src/dropdown.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 4f520f5a8f..767fa52077 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -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)) { |