The Swiper is throwing an error at runtime: "el.matches is not a function". #7398
Closed
5 of 6 tasks
Labels
t0ggles
Linked to the t0ggles task
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/nice-sunset-7w6sdx?file=%2Fsrc%2FApp.tsx
Bug description
Version:10.3.0


Error log:Uncaught TypeError: el.matches is not a function
Code location:
Babel compile ES2015 spread to ES5,output:
[].concat(element.children).filter(el=>el.matches(selector))
In JavaScript, attempting to use
[].concat(element.children)
to convert a collection of an element's child elements into a real array may not work as expected because element.children is an HTMLCollection, not an actual array.My Babel version:
@babel/core@7.24.1
@babel/plugin-transform-spread@7.24.1
Expected Behavior
No response
Actual Behavior
No response
Swiper version
10.3.0
Platform/Target and Browser Versions
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: