Commit 0b726de9 authored by Johann-S's avatar Johann-S Committed by XhmikosR
Browse files

fix(carousel): on load page create a carousel

parent 83cea3ba
Showing with 2 additions and 2 deletions
+2 -2
...@@ -597,7 +597,7 @@ EventHandler ...@@ -597,7 +597,7 @@ EventHandler
EventHandler.on(window, Event.LOAD_DATA_API, () => { EventHandler.on(window, Event.LOAD_DATA_API, () => {
const carousels = Util.makeArray(SelectorEngine.find(Selector.DATA_RIDE)) const carousels = Util.makeArray(SelectorEngine.find(Selector.DATA_RIDE))
for (let i = 0, len = carousels.length; i < len; i++) { 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 = (() => { ...@@ -28,7 +28,7 @@ const Data = (() => {
storeData[element.key.id] = data storeData[element.key.id] = data
}, },
get(element, key) { get(element, key) {
if (typeof element === 'undefined' || typeof element.key === 'undefined') { if (!element || typeof element.key === 'undefined') {
return null return null
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment