Skip to content

Commit

Permalink
Merge pull request #661 from davidjerleke/bug/#643
Browse files Browse the repository at this point in the history
Bugfix #643
  • Loading branch information
davidjerleke committed Dec 22, 2023
2 parents 2ed9fb1 + 4ae483a commit 084a891
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/embla-carousel-autoplay/src/components/Autoplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ function Autoplay(userOptions: AutoplayOptionsType = {}): AutoplayType {
optionsHandler: OptionsHandlerType
): void {
emblaApi = emblaApiInstance
if (emblaApi.scrollSnapList().length <= 1) return

const { mergeOptions, optionsAtMedia } = optionsHandler
const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions)
const allOptions = mergeOptions(optionsBase, userOptions)
options = optionsAtMedia(allOptions)

if (emblaApi.scrollSnapList().length <= 1) return

jump = options.jump
destroyed = false

Expand Down

0 comments on commit 084a891

Please sign in to comment.