From 1c9e203c52276b4a42cb38f0babf56cd62fefe3a Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 8 May 2020 17:28:43 +0300 Subject: [PATCH] dropdown.js: switch to a ternary --- js/src/dropdown.js | 7 +++---- 1 file 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)) {