Skip to content

Commit

Permalink
Apply fixes from @jelhan
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Radchenko committed Jul 24, 2018
1 parent 69b2ba1 commit b03abf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 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 @@ -148,27 +148,25 @@ const EmberRouter = EmberObject.extend(Evented, {

/**
Tell us if the router is currently loading.
@method _isLoading
@return {Boolean} The loading state
@property _isLoading
@type {Boolean}
@private
*/
get _isLoading() {
_isLoading: computed(function() {
return !!this._activeTransition;
},
}).volatile(),

/**
The active transition
@method _activeTransition
@return {Transition} Return router's active Transition object
@property _activeTransition
@type {Transition}
@private
*/
get _activeTransition() {
_activeTransition: computed(function() {
if (this._routerMicrolib) {
return this._routerMicrolib.activeTransition;
}
},
}).volatile(),

_hasModuleBasedResolver() {
let owner = getOwner(this);
Expand Down
11 changes: 5 additions & 6 deletions packages/ember-routing/tests/system/route_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,11 @@ moduleFor(
let postsModel = { id: '2' };

let router = {
_routerMicrolib: {
activeTransition: {
resolvedModels: {
'foo.bar': applicationModel,
'foo.bar.posts': postsModel,
},
_isSetup: true,
_activeTransition: {
resolvedModels: {
'foo.bar': applicationModel,
'foo.bar.posts': postsModel,
},
},
};
Expand Down

0 comments on commit b03abf1

Please sign in to comment.