mercredi 22 juin 2016

Ember route.connections is undefined while render on error events

I'd like to render message about server error. I create special route that present error message view. At the same time I don't want redirect to that route's url to be able to reload current page. So I decided to use function render in application route.

// application/route.js
actions: {
  error: function(error, transition) {
    if (error.errors) {
      return this.render('server-error.internal');
    }
    return true;
  }
}

It's working correctly when I redirect do page with error from other application's route that load correctly. When I type manually url of page with error I take error

Cannot read property 'push' of undefined

As I checked it's about uninitialized route's property named 'connections'. I found similar issues on github, but I couldn't find solution. I'll be grateful for any help.

I'm using ember-cli: 2.4.3




Aucun commentaire:

Enregistrer un commentaire