-
-
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
Error in swiper_angular.js in version 7.3.1 or 7.3.2 #5291
Comments
Hello @julgon2012. Please provide a online reproduction by codesandbox or a minimal GitHub repository. You can fork one of our demos in codesandbox to get start. Issues labeled by |
Can confirm this problem was introduced in version 7.3.2. Additional errors in: Cannot read properties of undefined (reading 'destroy') Cannot read properties of undefined (reading 'prevEl') Cannot read properties of undefined (reading 'destroy') |
I think I have managed to isolate the issue to slides that are being populated after initialization.
.
In my environment, this gives these exact errors in 7.3.2, but not 7.3.1. |
Same issue in our project with 7.3.2 version. Temporary fixed by return on 7.3.0.
|
Thanks for reporting! |
Check that this is really a bug
Reproduction link
no reproduction link
Bug description
An error occurs at line 729 (version 7.3.0) when you try to run
if (changedParams.scrollbar) {
if (this.scrollbar &&
typeof this.scrollbar !== 'boolean' &&
this.scrollbar.el &&
scrollbar &&
!scrollbar.el) {
this.updateParameter('scrollbar', this.scrollbar);
scrollbar.init();
scrollbar.updateSize();
scrollbar.setTranslate();
}
else {
scrollbar.destroy(); // --------> here!
scrollbar.el = null;
}
}
because the scrollbar object is undefined, but changedParams.scrollbar is true.
This does not happen until version 7.3.0 .-
In my project there are 3 swipers, but none use scrollbar, I don't even read the Scrollbar object from swiper.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
7.3.1 or 7.3.2
Platform/Target and Browser Versions
Windows 10 Pro, Chrome Versión 96.0.4664.93 (Build oficial) (64 bits)
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: