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

Uncaught error when unmounting Swiper with loop on window resize #7265

Closed
5 of 6 tasks
LeoDanielsson opened this issue Dec 20, 2023 · 1 comment · Fixed by Mapuppy09/tradetrust-website#8 · 4 remaining pull requests
Closed
5 of 6 tasks

Uncaught error when unmounting Swiper with loop on window resize #7265

LeoDanielsson opened this issue Dec 20, 2023 · 1 comment · Fixed by Mapuppy09/tradetrust-website#8 · 4 remaining pull requests
Labels

Comments

@LeoDanielsson
Copy link

LeoDanielsson commented Dec 20, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/devbox/error-when-unmount-swiper-on-resize-693vwm

Bug description

When unmounting a Swiper with loop={true} on a window resize event the following error is thrown by Swiper:

Uncaught TypeError: Cannot read properties of undefined (reading 'slidesPerGroupSkip') at _Swiper.slideTo

Expected Behavior

No uncaught errors should be thrown when unmounting Swiper.

Actual Behavior

An uncaught error is thrown when unmounting Swiper.

Swiper version

11.0.5

Platform/Target and Browser Versions

macOS, Windows, iOS, Android, Safari, Chrome, Edge, Firefox

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
@joebentaylor1995
Copy link

I have this issue too, causing my swiper to not work on mobile

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