Ember: Uncaught TypeError: Cannot read property 'shouldSupercede' of undefined

Ran into a problem of "Uncaught TypeError: Cannot read property 'shouldSupercede' of undefined"


Turns out the issue was that my route had a dynamic segment and I forgot to pass in the parameter.

Further, this was a mistake on my part, that I was creating a 'new' route, didn't want the 'new' route to be dynamic.

 I was calling something like {{#link-to "foo.bar.new"}} where foo.bar required a bar to passed to the route.


this.route('foo', function() {
    this.route('bar', {
      path: ':bar_id'
    }, function() {
      this.route('baz');
      this.route('new');
    });
});

Resolved the issue by changing the route from 'foo.bar.new' to 'foo.new' which would create the bar entry

this.route('foo', function() {
    this.route('new'),
    this.route('bar', {
      path: ':bar_id'
    }, function() {
      this.route('baz');
    });
});