diff options
| author | GeoSot <[email protected]> | 2021-09-10 11:57:58 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2022-03-01 16:56:33 +0200 |
| commit | c644f09d88a93445b415faa796f1d246ca34e2e7 (patch) | |
| tree | 1206c0a56c3f8746f99c39cef0621a4f1c4d1e69 /js/src/carousel.js | |
| parent | eb8d5b43cedc76d88331f4d2f6ed3bca10e573ff (diff) | |
| download | bootstrap-c644f09d88a93445b415faa796f1d246ca34e2e7.tar.xz bootstrap-c644f09d88a93445b415faa796f1d246ca34e2e7.zip | |
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/carousel.js')
| -rw-r--r-- | js/src/carousel.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index 4262d60df..ea258527d 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) } |
