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

The Swiper is throwing an error at runtime: "el.matches is not a function". #7398

Closed
5 of 6 tasks
bowstone opened this issue Mar 20, 2024 · 3 comments
Closed
5 of 6 tasks
Labels
t0ggles Linked to the t0ggles task

Comments

@bowstone
Copy link

Check that this is really a bug

  • I confirm

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
image
Code location:
image
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

  • 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
Copy link

t0ggles bot commented Mar 20, 2024

Task nolimits4web/SWIPER-77 was linked to the issue

t0ggles task SWIPER-77

@nolimits4web
Copy link
Owner

Closing as not related to Swiper

Copy link

t0ggles bot commented Mar 28, 2024

Task nolimits4web/SWIPER-77 status changed to Done

@t0ggles t0ggles bot added the t0ggles Linked to the t0ggles task label Mar 28, 2024
Repository owner locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
t0ggles Linked to the t0ggles task
Projects
None yet
Development

No branches or pull requests

2 participants