openvv
openvv copied to clipboard
Uncaught TypeError: Cannot read property 'left' of undefined
I noticed that in positionBeacons()
, line 1092, its checking for truthy on lastPlayerLocation
, but not for playerLocation
, which could throw undefined
errors looking at playerLocation.left
, etc.
// when we don't have an initial position, or the position hasn't changed
if (lastPlayerLocation && (lastPlayerLocation.left === playerLocation.left && lastPlayerLocation.right === playerLocation.right && lastPlayerLocation.top === playerLocation.top && lastPlayerLocation.bottom === playerLocation.bottom)) {
// no need to update positions
return;
}
Issue a pull reqeust
I didn't run any unit tests, not quite sure how and ran out of time! (It's Friday at 5pm)
I also noticed this appears to be fixed in RC 1.2, so reject Pull if you want.
I am also seeing Uncaught TypeError: Cannot read property 'left' of undefined
if the element is no longer on the page. You can see an example of this here. When the preroll is complete the SWFObject is removed from the page and positionBeacons()
continues to check for it's location and cannot retrieve the client recs.
I am also seeing this on my site. I also don't understand why you use setInterval instead of setTimeout (as I understand this, this function should be executed once).
any update on this? is there a workaround?
The video ends up being choppy because of the amount of exceptions thrown
Seems like this was fixed by https://github.com/InteractiveAdvertisingBureau/openvv/commit/48308046413ccbd1ddb99bf8427a4d41f26f3f4b
..but somehow this is out of our dependency chain
It was fixed as part of the latest release v2.5.
Thanks!
OP may close this issue