-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Cannot read properties of undefined (reading 'classList') #6335
Comments
keep getting this error in 9.3.2 !!! thumbs.js:68 Uncaught TypeError: Cannot read properties of undefined (reading 'classList')
|
Small solution for vue/nuxt developers Use ref insted useStateI pass the value of
I didn't need |
React developers check this article for solution. https://medium.com/@0l4m1de/troubleshooting-swiper-js-error-cannot-read-properties-of-undefined-reading-classlist-5064cae037e7 |
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/musing-chaum-tx84zk?file=/src/app/app.component.html
Bug description
I can't reproduce it actually. The code is the same. Just the application arround it is bigger.
The error is that it says above error when using thumbs. I debugged it and can see that it gets the correct Swiper instance but the slides array does not update or update too late.
Expected Behavior
Perhaps a check if the thumbs instance is fully initialized before using instance props
Actual Behavior
Swiper version
9.x
Platform/Target and Browser Versions
latest macOS
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: