Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
armandsalle committed Jan 15, 2021
1 parent ec74bf0 commit 4cac29f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "butter-slider",
"version": "1.1.3",
"version": "1.1.4",
"description": "Simple hold and drag slider",
"main": "dist/bundle.umd.js",
"module": "dist/bundle.esm.js",
Expand Down
10 changes: 6 additions & 4 deletions src/autoInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ class AutoCreateSlider {
}
}

const autoInit = (): CreateSlider[] => {
const autoInit = async (): Promise<CreateSlider[]> => {
let slidersList

window.addEventListener('load', () => {
slidersList = new AutoCreateSlider()
})
const createArrayOfSliders = async () => {
slidersList = await new AutoCreateSlider()
}

await window.addEventListener('load', createArrayOfSliders)

return slidersList.sliders
}
Expand Down

0 comments on commit 4cac29f

Please sign in to comment.