code: function(manager) {
      // Start from the beginning of the enter states. If the state was added
      // to the list during the context matching phase, make sure the context
      // has actually changed since the last time the state was entered.
      while (this.enterStates.length > 0) {
        if (this.enterStates[0] !== this.exitStates[0]) { break; }
  
        if (this.enterStates.length === this.contexts.length) {
          if (manager.getStateMeta(this.enterStates[0], 'context') !== this.contexts[0]) { break; }
          this.contexts.shift();
        }
  
        this.resolveState = this.enterStates.shift();
        this.exitStates.shift();
      }
    }
docs: @private
  
  Remove any states that were added because the number of contexts
  exceeded the number of explicit enter states, but the context has
  not changed since the last time the state was entered.
  
  @param {Ember.StateManager} manager passed in to look up the last
  context for a states