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

Uncaught TypeError: Cannot read property 'left' of undefined #84

Open
AgileMantis opened this issue Jun 5, 2015 · 8 comments
Open

Uncaught TypeError: Cannot read property 'left' of undefined #84

AgileMantis opened this issue Jun 5, 2015 · 8 comments
Labels

Comments

@AgileMantis
Copy link

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;
    }
@AgileMantis
Copy link
Author

Issue a pull reqeust

@AgileMantis
Copy link
Author

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.

@louisjimenez
Copy link

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.

trainwreck_s_amy_schumer_and_judd_apatow_on_standup_routines___vanity_fair

@BranoMatan
Copy link

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).

@eridal
Copy link

eridal commented Jan 22, 2016

any update on this? is there a workaround?

The video ends up being choppy because of the amount of exceptions thrown

@eridal
Copy link

eridal commented Jan 22, 2016

Seems like this was fixed by 4830804

..but somehow this is out of our dependency chain

@alonashkenazi
Copy link
Contributor

It was fixed as part of the latest release v2.5.

@eridal
Copy link

eridal commented Jan 22, 2016

Thanks!

OP may close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants