You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was pairing with someone today and stupidly exported a component instead of a route from a route file. The resulting message said that there was an error loading my route:
route._stashNames is not a function
The code we were dealing with had a lot going on, so we lost time debugging before we found that we had extended the wrong Ember object.
Would it be reasonable to check that an exported route is in fact an Ember.Route and give a helpful error message? Where would be a good place to put that kind of check?
The text was updated successfully, but these errors were encountered:
I think the simplest thing to do would be to implement resolveRoute in the resolver, and do some sort of brand check (adding isRoute: true) on the returned factory. Then do an assert if the check doesn't pass...
I was pairing with someone today and stupidly exported a component instead of a route from a route file. The resulting message said that there was an error loading my route:
The code we were dealing with had a lot going on, so we lost time debugging before we found that we had extended the wrong Ember object.
Would it be reasonable to check that an exported route is in fact an Ember.Route and give a helpful error message? Where would be a good place to put that kind of check?
The text was updated successfully, but these errors were encountered: