-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
TypeError: images.forEach is not a function - <InnerSlider> component #1138
Comments
This is the same issue as #1132. Some (older) browsers do not provide the method 'forEach' for NodeLists, which is the return value of document.querySelectorAll(). |
Thanks @jmschlmrs, i'll close this issue. |
Heh, we both closed our issues. Oops. |
Although the problem should have been fixed by the latest verson 0.22 3. |
Are you referring to changes here? Array.from is not supported by IE (less than edge). This will continue to be an issue unless you've polyfilled .from() |
Could you tell me if either of the following would work: [...images].forEach Converting to an array by the slice method from Arrays: Array.prototype.slice.call(images).forEach |
@laveesingh, can confirm that Array.prototype.forEach.call(images, function(e){}); worked for me on IE11. On a related note, looks like react-slick is using babel-polyfill. I'm assuming NodeList.forEach() is set to be added to that after core-js (which babel-polyfill uses) releases their V3: zloirock/core-js#329. |
The referenced commit should take care of it, the changes will be released soon. |
thanks :D |
Hi everyone, I'm getting the following error when I run my application on the ipad:
TypeError: images.forEach is not a function. (In 'images.forEach', 'images.forEach' is undefined)
InnerSlider_componentDidUpdate
Debugging the code it renders the component in the view, but when it executes this function it throws the error.
Only on the iPad does this happen, anyone have any idea what it could be?
The text was updated successfully, but these errors were encountered: