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

App.authenticate uses wrong `this` reference #341

Closed
clapik opened this Issue Nov 4, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@clapik
Copy link

clapik commented Nov 4, 2016

@daffl

This comment has been minimized.

Copy link
Member

daffl commented Nov 4, 2016

If you call app.authenticate the this reference will be app. You can't call the method out of context however with something like

var auth = app.authenticate;
auth();

It has to be var auth = app.authenticate.bind(app);

@clapik

This comment has been minimized.

Copy link
Author

clapik commented Nov 5, 2016

oh i see! thanks for the response!

@clapik clapik closed this Nov 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.