Permalink
Browse files

use `State#current` instead of `controller().current`

  • Loading branch information...
1 parent 4cc4b03 commit 33883feb3c4c141a50c7ece301a3b3e43108ab55 @nickfargo committed Apr 10, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/state.js
  2. +3 −3 state.js
View
@@ -509,7 +509,7 @@ var State = ( function () {
// state, any identically named substate held on a protostate will be returned.
substate: function ( substates ) {
return function ( /*String*/ stateName, /*Boolean*/ viaProto ) {
- var s = this.controller().current(),
+ var s = this.current(),
ss, protostate;
viaProto === undefined && ( viaProto = true );
@@ -1106,15 +1106,15 @@ var State = ( function () {
//
// Returns a `Boolean` indicating whether `this` is the controller’s current state.
isCurrent: function () {
- return this.controller().current() === this;
+ return this.current() === this;
},
// #### isActive
//
// Returns a `Boolean` indicating whether `this` or one of its substates is the
// controller’s current state.
isActive: function () {
- var current = this.controller().current();
+ var current = this.current();
return current === this || this.isSuperstateOf( current );
},
View
@@ -691,7 +691,7 @@ var State = ( function () {
// state, any identically named substate held on a protostate will be returned.
substate: function ( substates ) {
return function ( /*String*/ stateName, /*Boolean*/ viaProto ) {
- var s = this.controller().current(),
+ var s = this.current(),
ss, protostate;
viaProto === undefined && ( viaProto = true );
@@ -1288,15 +1288,15 @@ var State = ( function () {
//
// Returns a `Boolean` indicating whether `this` is the controller’s current state.
isCurrent: function () {
- return this.controller().current() === this;
+ return this.current() === this;
},
// #### isActive
//
// Returns a `Boolean` indicating whether `this` or one of its substates is the
// controller’s current state.
isActive: function () {
- var current = this.controller().current();
+ var current = this.current();
return current === this || this.isSuperstateOf( current );
},

0 comments on commit 33883fe

Please sign in to comment.