Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/src/carousel.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 9fd8aae3db..2874e6e95d 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -406,12 +406,10 @@ class Carousel extends BaseComponent {
_setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
- const activeIndicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement)
+ const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)
- for (let i = 0; i < activeIndicators.length; i++) {
- activeIndicators[i].classList.remove(CLASS_NAME_ACTIVE)
- activeIndicators[i].removeAttribute('aria-current')
- }
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE)
+ activeIndicator.removeAttribute('aria-current')
const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)