diff options
| author | Johann-S <[email protected]> | 2019-07-23 21:15:00 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2019-07-24 11:27:35 +0200 |
| commit | fc02932946424e986a72bb7b47044eab815851cb (patch) | |
| tree | 1fb51782942b8cd3d52edaa7146971c5e40a825b /js/src/carousel | |
| parent | f4dbffe93adf5c71e16cc07dda24e66ce72d30b5 (diff) | |
| download | bootstrap-fc02932946424e986a72bb7b47044eab815851cb.tar.xz bootstrap-fc02932946424e986a72bb7b47044eab815851cb.zip | |
use get selector from element only when needed
Diffstat (limited to 'js/src/carousel')
| -rw-r--r-- | js/src/carousel/carousel.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/js/src/carousel/carousel.js b/js/src/carousel/carousel.js index 0e1bad14a..af4229f07 100644 --- a/js/src/carousel/carousel.js +++ b/js/src/carousel/carousel.js @@ -9,7 +9,7 @@ import { jQuery as $, TRANSITION_END, emulateTransitionEnd, - getSelectorFromElement, + getElementFromSelector, getTransitionDurationFromElement, isVisible, makeArray, @@ -569,13 +569,7 @@ class Carousel { } static _dataApiClickHandler(event) { - const selector = getSelectorFromElement(this) - - if (!selector) { - return - } - - const target = SelectorEngine.findOne(selector) + const target = getElementFromSelector(this) if (!target || !target.classList.contains(ClassName.CAROUSEL)) { return |
