Skip to content

Commit

Permalink
[BUGFIX release] Avoid computed for tracking errors in Router.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Dec 27, 2015
1 parent ff4d431 commit a8dc7ca
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/ember-routing/lib/system/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import { guidFor } from 'ember-metal/utils';
import RouterState from './router_state';
import { getOwner } from 'container/owner';
import dictionary from 'ember-metal/dictionary';

/**
@module ember
Expand Down Expand Up @@ -113,6 +114,7 @@ var EmberRouter = EmberObject.extend(Evented, {
this._activeViews = {};
this._qpCache = new EmptyObject();
this._resetQueuedQueryParameterChanges();
this._handledErrors = dictionary(null);
},

/*
Expand Down Expand Up @@ -727,22 +729,18 @@ var EmberRouter = EmberObject.extend(Evented, {
this._slowTransitionTimer = null;
},

_handledErrors: computed(function() {
return {};
}),

// These three helper functions are used to ensure errors aren't
// re-raised if they're handled in a route's error action.
_markErrorAsHandled(error) {
this.get('_handledErrors')[error] = true;
_markErrorAsHandled(errorGuid) {
this._handledErrors[errorGuid] = true;
},

_isErrorHandled(error) {
return this.get('_handledErrors')[error];
_isErrorHandled(errorGuid) {
return this._handledErrors[errorGuid];
},

_clearHandledError(error) {
delete this.get('_handledErrors')[error];
_clearHandledError(errorGuid) {
delete this._handledErrors[errorGuid];
}
});

Expand Down

0 comments on commit a8dc7ca

Please sign in to comment.