-
Notifications
You must be signed in to change notification settings - Fork 1.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
obj is not iterable #308
Comments
@Craigy- I made a simple test with the jquery version of images loaded with a simple container loading a number of images as immediate children and was still getting the 'obj not iterable' error. I just went in and updated the code in the in the script to use the Object.values() method to convert to an array so that I didn't run into the iterable issue with the Object. I updated this And all is working now, |
The issue also occurs on WordPress 6.4.2. The following combination is running there:
After modifying line 138 in the imagesloaded script, the script runs without errors: Line 138:
Changed to:
Please take a close look at the issue and fix it. All WP pages currently upgrading and using imagesloaded with masonry will encounter this problem. Furthermore, the current fix is not persistent, as the file will be overwritten with the original during the next upgrade. |
We got the same problem when loading jquery 2.1.4 inside an old theme, instead of jquery 3.7.1 of wordpress 6.4.5. We've reverted to 6.3.5 that include imagesLoaded 4.1.4. We should probably upgrade the theme since jquery 2 is not supported anymore. in jQuery 2, in jQuery 3.7.*, |
After updating this script from 4.1.0 to 5.0.0 without any changes of initialization code, it's now thrown error and doesn't work:
Uncaught TypeError: obj is not iterable
Initialization code:
console.log => Object { 0: div.all-b.vertical-b.js-b, context: div.all-b.vertical-b.js-b, length: 1 }
The text was updated successfully, but these errors were encountered: