diff options
| author | Markus Hatvan <[email protected]> | 2019-08-22 21:17:34 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-08-22 22:17:34 +0300 |
| commit | 4d101491da094418a768ff2f44be1ca85fd85922 (patch) | |
| tree | dd6e4fe48b96df3cf4fe4f01839d1dd1aec8e0b2 /js/src/button | |
| parent | 6885d65578b4938f3a8fdf1de65946c79415b94d (diff) | |
| download | bootstrap-4d101491da094418a768ff2f44be1ca85fd85922.tar.xz bootstrap-4d101491da094418a768ff2f44be1ca85fd85922.zip | |
Remaining JS linting TODO (#29289)
* Enable and fix all occurrences with no-mixed-operators rule
* Take care of the max-depth warning in button.js
Signed-off-by: mhatvan <[email protected]>
Diffstat (limited to 'js/src/button')
| -rw-r--r-- | js/src/button/button.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/js/src/button/button.js b/js/src/button/button.js index d64f5130e..4418ba6b8 100644 --- a/js/src/button/button.js +++ b/js/src/button/button.js @@ -74,17 +74,15 @@ class Button { if (rootElement) { const input = SelectorEngine.findOne(Selector.INPUT, this._element) - if (input) { - if (input.type === 'radio') { - if (input.checked && - this._element.classList.contains(ClassName.ACTIVE)) { - triggerChangeEvent = false - } else { - const activeElement = SelectorEngine.findOne(Selector.ACTIVE, rootElement) - - if (activeElement) { - activeElement.classList.remove(ClassName.ACTIVE) - } + if (input && input.type === 'radio') { + if (input.checked && + this._element.classList.contains(ClassName.ACTIVE)) { + triggerChangeEvent = false + } else { + const activeElement = SelectorEngine.findOne(Selector.ACTIVE, rootElement) + + if (activeElement) { + activeElement.classList.remove(ClassName.ACTIVE) } } |
