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

Cannot read properties of undefined (reading 'setPosition') #4290

Open
avroemans opened this issue Feb 27, 2024 · 0 comments
Open

Cannot read properties of undefined (reading 'setPosition') #4290

avroemans opened this issue Feb 27, 2024 · 0 comments

Comments

@avroemans
Copy link

short description of the bug / issue, provide more detail below.

We noticed a lot of Javascript errors popping up on customers of our website.
The Javascript error read:
Cannot read properties of undefined (reading 'setPosition')

We couldn't reproduce this problem for now but we still see errors coming in. I checked the source of the library and found the root of the problem:
ret = _[i].slick[opt].apply(_[i].slick, args);
Sometimes _[i].slick is undefined for a undefined reason. I'm not sure how this could happen, but it looks like some extra validation needs to be put in place here. Also to create the Slick slider if it isn't present yet.

====================================================================

What is the expected behaviour?

No client-side javascript errors and a working Slick slider

====================================================================

What is observed behaviour?

Javascript errors and the slider possibly not working correcrly.

====================================================================

More Details

Issue seems to only occur on Android devices.
image
image

I am using jQuery 3.4.1 and Slick 1.8.1

  • Did this work before?
    Unsure. As soon as we enabled client-side Javascript error logging, this problem came up.
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