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

Array instead of element #5711

Closed
fabianmarcus opened this issue May 10, 2022 · 2 comments
Closed

Array instead of element #5711

fabianmarcus opened this issue May 10, 2022 · 2 comments

Comments

@fabianmarcus
Copy link

return $el.children(getWrapperSelector());

This line is causing an error in my application, because $el becomes an array containing the wanted swiper element. So using children() ends up in an exception. I think it should become just the element without the surrounding array, right?

Could this be a side effect of an dom7 update?

@fabianmarcus
Copy link
Author

fabianmarcus commented May 10, 2022

Structure of $el...

Array(1)
0: div.swiper
length: 1
__proto__: (...)
get __proto__: ƒ ()
set __proto__: ƒ (value)
[[Prototype]]: Array(0)

@fabianmarcus
Copy link
Author

​ TypeError: $el.children is not a function
    at getWrapper (core.js:438:18)
    at Swiper.push../src/mithril/node_modules/swiper/core/core.js.Swiper.mount (core.js:442:22)
    at Swiper.push../src/mithril/node_modules/swiper/core/core.js.Swiper.init (core.js:472:28)
    at new Swiper (core.js:203:14)
    at Slider.__webpack_modules__../src/mithril/shared/components/slider/slider.m.tsx.Slider.oncreate (slider.m.tsx:17:24)
    at Function.callHook (render.js:30:16)
    at render.js:971:50
    at sync (mount-redraw.js:14:10)
    at mount-redraw.js:25:5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant