From 9baa34500b013910e4460ba29592d196e8be1c75 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 7 Dec 2015 18:37:04 +0000 Subject: [PATCH] Prevent 404-handler mixin from erroring on non-adapter errors no issue - add a check for existence of `error.errors` as that won't be present on non-404 errors - fixes non-404 errors such as "no action handled x" being hidden by a completely different error --- ghost/admin/app/mixins/404-handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/app/mixins/404-handler.js b/ghost/admin/app/mixins/404-handler.js index 361e13ae21..600324a057 100644 --- a/ghost/admin/app/mixins/404-handler.js +++ b/ghost/admin/app/mixins/404-handler.js @@ -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];