diff --git a/app/routes/crate.js b/app/routes/crate.js index 669404a5fec..d25855600db 100644 --- a/app/routes/crate.js +++ b/app/routes/crate.js @@ -10,17 +10,16 @@ export default Ember.Route.extend({ version = parts[1]; } var self = this; - var a = Ember.RSVP.hash({ + return Ember.RSVP.hash({ crate: this.store.find('crate', crate_id).catch(function(e) { if (e.status === 404) { self.controllerFor('application').set('nextFlashError', 'No crate named: ' + params.crate_id); - return self.transitionTo('index'); + return self.replaceWith('index'); } }), version: version, }); - return a; }, serialize: function(model) {