dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

[V4.1.2] TypeError: undefined is not an object (evaluating 'e.x') #1594

Open desean opened 5 years ago

desean commented 5 years ago

version:4.1.2

TypeError: undefined is not an object (evaluating 'e.x') at x (webpack:///node_modules/photoswipe/dist/photoswipe.js:517:0)

516 | _roundPoint = function(p) { 517 | p.x = Math.round(p.x); // some times p is undefined 518 | p.y = Math.round(p.y); 519 | },

UserAgent: Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A366 MicroMessenger/7.0.1(0x17000120) NetType/4G Language/zh_CN

gempir commented 5 years ago

Still happening on 4.1.3 on iPhone X (iOS 12)

woodstream commented 4 years ago

Still happening on 4.1.3 on iPhone X (iOS 12) Have you fixed it?

davidicusrex-git commented 4 years ago

Still no response?

jancervinka commented 4 years ago

I had the same error and discovered that some of my items had height: NaN because the images were not properly loaded when I was constructing the array of items. (Thanks to #1359)