mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
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
This commit is contained in:
parent
adfad93242
commit
d989933b5c
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue