Merge pull request #6181 from kevinansfield/fix-404-handler

Prevent 404-handler mixin from erroring on non-adapter errors
This commit is contained in:
Hannah Wolfe 2015-12-10 16:26:07 +00:00
commit cbe9ee1cd1

View File

@ -3,7 +3,7 @@ import Ember from 'ember';
export default Ember.Mixin.create({
actions: {
error(error, transition) {
if (error.errors[0].errorType === 'NotFoundError') {
if (error.errors && error.errors[0].errorType === 'NotFoundError') {
transition.abort();
let routeInfo = transition.handlerInfos[transition.handlerInfos.length - 1];