crashlytics/backbone.statemanager — pull request #8 by davb (2013-05-22 15:48:43+00:00)
Title: `@currentState` should be set before calling `state.enter` and triggering the `enter:state` event

Fixes #7 : As @kenzic noted, a callback listening to `enter:state` and reading the StateManager's `@currentState` property would get an incorrect value.

I think such callbacks, as well as the `state.enter` method, should be called after setting `@currentState` to the name of the new state being entered, so that if they read `@currentState`, they get the correct value.