2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-30 15:24:08 +03:00

use get selector from element only when needed

This commit is contained in:
Johann-S
2019-07-23 21:15:00 +02:00
parent f4dbffe93a
commit fc02932946
8 changed files with 82 additions and 49 deletions
+2 -8
View File
@@ -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