Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError : Cannot read properties of undefined (reading 'speed') #7416

Labels
t0ggles Linked to the t0ggles task

Comments

@chonlatit-tpit
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

Bug description

Hi,

We use swiper in our project and we occasionally found the error from error monitoring tools (datadog).
The error is come form /swiper/esm/components/core/slide/slideNext.js (see attached files).

We try to reproduced the bug but cant. We used to have the same bug in other parts of our code and we solve this with

speed = this?.params?.speed
In this case, Is it possible to create pull requests for fixed this one.

Our project used

nextjs (v.12.2)
swiper (v.6.8.4)

Screen Shot 2023-10-09 at 11 39 25 AM

Expected Behavior

Should not show error in any browser.

Actual Behavior

Error shown up in some error. (We found from monitoring tool)

Swiper version

6.8.4

Platform/Target and Browser Versions

macOS/Chrome

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@nolimits4web
Copy link
Owner

t0ggles-create swiper

Copy link

t0ggles bot commented Mar 25, 2024

Task nolimits4web/SWIPER-80 was created

t0ggles task SWIPER-80

@chonlatit-tpit
Copy link
Author

@nolimits4web Hi, do you need more information ?

@zainali225
Copy link

Did you try to pass second argument of speed.In my case, it solved the issue
textSwiper.slideTo(imageSwiper.activeIndex, 0);

@chonlatit-tpit
Copy link
Author

Hi, we didn't use .slideTo method but we use autoplay options.
The error occur when we use autoplay options then we change page and swiper try to slideNext (from autoplay option).

Our website use Next.js and we change with next router (change page without refresh)

Copy link

t0ggles bot commented Mar 28, 2024

Task nolimits4web/SWIPER-80 status changed to Done

@t0ggles t0ggles bot added the t0ggles Linked to the t0ggles task label Mar 28, 2024
@chonlatit-tpit
Copy link
Author

@nolimits4web
Thanks for fixed the code on master branch
I'm not sure is it possible to update on version 6.8.5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment