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
path: root/js/src
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-09-10 11:57:58 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-03-01 17:56:33 +0300
commitc644f09d88a93445b415faa796f1d246ca34e2e7 (patch)
tree1206c0a56c3f8746f99c39cef0621a4f1c4d1e69 /js/src
parenteb8d5b43cedc76d88331f4d2f6ed3bca10e573ff (diff)
Carousel: simplify carousel items selection
We already know that carousel's parent is the carousel element, so we can use it explicitly
Diffstat (limited to 'js/src')
-rw-r--r--js/src/carousel.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 4262d60dfd..ea258527da 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -267,9 +267,7 @@ class Carousel extends BaseComponent {
}
_getItemIndex(element) {
- this._items = element && element.parentNode ?
- SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :
- []
+ this._items = SelectorEngine.find(SELECTOR_ITEM, this._element)
return this._items.indexOf(element)
}