lib/services/sf.js
function(state, transitionContext)
  {
    // this check is necessary to make sure we don't re-enter a transient state
    // like Renewing when we're already in it
    if (currentState !== state)
    {
      // if we have a current state, exit it; the null check is necessary
      // because the currentState is undefined at bootstrap time when we
      // transition to the first state
      if (currentState)
      {
        currentState.exit();
      }

      // update the current state
      currentState = state;

      // enter the new state
      currentState.enter(transitionContext);
    }
  }
function(state, transitionContext)
  {
    // this check is necessary to make sure we don't re-enter a transient state
    // like Renewing when we're already in it
    if (currentState !== state)
    {
      // if we have a current state, exit it; the null check is necessary
      // because the currentState is undefined at bootstrap time when we
      // transition to the first state
      if (currentState)
      {
        currentState.exit();
      }

      // update the current state
      currentState = state;

      // enter the new state
      currentState.enter(transitionContext);
    }
  }
function ( state , transitionContext ) { // this check is necessary to make sure we don't re-enter a transient state // like Renewing when we're already in it if ( currentState !== state ) { // if we have a current state, exit it; the null check is necessary // because the currentState is undefined at bootstrap time when we // transition to the first state if ( currentState ) { currentState . exit ( ) ; } // update the current state currentState = state ; // enter the new state currentState . enter ( transitionContext ) ; } }
Transitions to a given state.

@param {Object} state
@param {Object} [transitionContext]
Transitions to a given state .