aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
Diffstat (limited to 'js/src')
-rw-r--r--js/src/dropdown.js13
1 files changed, 1 insertions, 12 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 09414c97b..be561b128 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -124,18 +124,7 @@ class Dropdown extends BaseComponent {
// Public
toggle() {
- if (isDisabled(this._element)) {
- return
- }
-
- const isActive = this._isShown()
-
- if (isActive) {
- this.hide()
- return
- }
-
- this.show()
+ return this._isShown() ? this.hide() : this.show()
}
show() {