ianmcgregor/state-machine-js — pull request #2 by milkisevil (2014-09-25 12:49:55+00:00)
Title: Guards **Perhaps merge to a new branch as tests failing**

Hey Ian,

Would you be able to look into this? I've added tests surrounding the use of `cancel()` within guards (`onEnter` and `onExit`) but they're not passing.

I think it's down to a subsequent call to `stateMachine.action()` after a previous call has resulted in a cancel. Basically `this._hasChanged` remains false so `this._actionQueue.push()` is called and a would-be successful transition never happens.

Rather than me trying to figure out the wider use of `hasChanged`, I figure you'd understand the issue immediately?

Cheers,
:p