mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
fix(carousel): on load page create a carousel
This commit is contained in:
parent
83cea3bafa
commit
0b726de94e
@ -597,7 +597,7 @@ EventHandler
|
||||
EventHandler.on(window, Event.LOAD_DATA_API, () => {
|
||||
const carousels = Util.makeArray(SelectorEngine.find(Selector.DATA_RIDE))
|
||||
for (let i = 0, len = carousels.length; i < len; i++) {
|
||||
Carousel._carouselInterface.call(carousels[i], Data.getData(carousels[i], DATA_KEY))
|
||||
Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY))
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -28,7 +28,7 @@ const Data = (() => {
|
||||
storeData[element.key.id] = data
|
||||
},
|
||||
get(element, key) {
|
||||
if (typeof element === 'undefined' || typeof element.key === 'undefined') {
|
||||
if (!element || typeof element.key === 'undefined') {
|
||||
return null
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user