1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +02:00

fix: remove make array util function (#30430)

This commit is contained in:
Johann-S
2020-03-25 15:35:02 +01:00
committed by GitHub
parent 98c4598696
commit 26d86fce2a
17 changed files with 53 additions and 89 deletions

View File

@@ -12,7 +12,6 @@ import {
getElementFromSelector,
getTransitionDurationFromElement,
isVisible,
makeArray,
reflow,
triggerTransitionEnd,
typeCheckConfig
@@ -322,7 +321,7 @@ class Carousel {
}
}
makeArray(SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)).forEach(itemImg => {
SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault())
})
@@ -358,7 +357,7 @@ class Carousel {
_getItemIndex(element) {
this._items = element && element.parentNode ?
makeArray(SelectorEngine.find(SELECTOR_ITEM, element.parentNode)) :
SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :
[]
return this._items.indexOf(element)
@@ -601,7 +600,8 @@ EventHandler
.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler)
EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
const carousels = makeArray(SelectorEngine.find(SELECTOR_DATA_RIDE))
const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)
for (let i = 0, len = carousels.length; i < len; i++) {
Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY))
}