Permalink
Browse files

reorg

  • Loading branch information...
nickfargo committed Apr 7, 2012
1 parent f006dd2 commit 877acfaf1d9586294a985e33a6d88d5333c6642f
Showing with 4 additions and 10 deletions.
  1. +2 −5 lib/state-controller.js
  2. +2 −5 state.js
View
@@ -119,13 +119,10 @@ var StateController = ( function () {
// implementation of its state.
function createAccessor ( owner, name, self ) {
function accessor () {
- var current, controller, root, key, method,
- fn = arguments[0];
+ var fn, current, controller, root, key, method;
if ( this === owner ) {
- if ( Z.isFunction( fn ) ) {
- return self.change( fn.call( this ) );
- }
+ if ( Z.isFunction( fn = arguments[0] ) ) return self.change( fn.call( this ) );
current = self.current();
return arguments.length ? current.match.apply( current, arguments ) : current;
}
View
@@ -1714,13 +1714,10 @@ var StateController = ( function () {
// implementation of its state.
function createAccessor ( owner, name, self ) {
function accessor () {
- var current, controller, root, key, method,
- fn = arguments[0];
+ var fn, current, controller, root, key, method;
if ( this === owner ) {
- if ( Z.isFunction( fn ) ) {
- return self.change( fn.call( this ) );
- }
+ if ( Z.isFunction( fn = arguments[0] ) ) return self.change( fn.call( this ) );
current = self.current();
return arguments.length ? current.match.apply( current, arguments ) : current;
}

0 comments on commit 877acfa

Please sign in to comment.