-
Notifications
You must be signed in to change notification settings - Fork 552
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
this is being shadowed in _onSocketMessage in several branches. #39
Comments
I saw this in at least one other branch earlier but fixed it without really thinking to report it as a bug. For clarity and consistency sake, you guys should probably just make that assignment in |
I created a PR to address this issue in |
I left a post in the Udacity forums about this issue as well. |
Just realized this issue was caused by me moving I'd still argue that making the |
In the initial branch, _onSocketMessage refers to
this._postsView.addPosts()
, which works fine.In later branches,
this._postsView.addPosts()
is wrapped in other promises and loses it's scope.Here's one example in Lesson 4, step 7 (task-clean-db branch):
wittr/public/js/main/IndexController.js
Line 174 in 43e3098
The fix is to assign this to
var indexController = this;
as is being done in the rest of the code.The text was updated successfully, but these errors were encountered: