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
Ember.Route 'enter' hook missing _super() call will die with unhelpful error #11136
Comments
@glennfu |
@selvagsz it maybe private now, but there was a time that it was used widely in examples as an easy way to reset scrollTop, which is what I was using it for. It was maybe the oldest piece of original code left in my app, and so when this happened it took me well over a day to trace down the error. |
It is always a good idea to do The It may be possible to ensure that |
@rwjblue it's been marked, but that hasn't stopped the examples. If you google "ember reset scrollTop", the second link (first non ember-docs link) is this: http://stackoverflow.com/questions/13120474/emberjs-scroll-to-top-when-changing-view |
@runspired - Sadly, I do not have the power to make all examples ever use only public API's and give good advice. 😸 In the end, it really isn't an issue of public/private, I can not think of a way to do what this issue is requesting (to enforce |
Ok, this is pretty stale, and the solution is to call I'm happy to reopen if others have a better idea... |
I've been using an "enter" hook on my route to set up some connections to Pusher that my app uses, and an "exit" hook to remove them. I'm not sure what round of googling suggested me to use this, but I was using it without calling
this._super()
. In Ember 1.10.0, this was totally fine and I wasn't given any warnings or messages. Once I upgraded to Ember 1.11.1, the app just died and FireFox gave the following error:Chrome was a bit more helpful and said:
and pointed me to
EmberObject.default.extend.render
. The solution, as @runspired offered, was to callthis.super()
.Here's a JSBin in case that's necessary: http://emberjs.jsbin.com/kilohiquda/1/
Googling didn't help me out so hopefully people having this problem will find this post. I think the best solution in my mind would be to have Ember more gracefully handle this error and let the user know where they messed up.
Edit: Maybe it would be nice to mention as a 1.10 -> 1.11 transition/migration detail since that's when it changed.
The text was updated successfully, but these errors were encountered: