transitions() doesn't return events that use a wildcard in the "from" property #93

Closed
Shaunm44 opened this Issue Aug 6, 2016 · 1 comment

Projects

None yet

2 participants

@Shaunm44
Shaunm44 commented Aug 6, 2016

Been messing with the FSM (thanks btw, tons of headache avoided b/c of this) and tried using the wildcard feature. Unfortunately, when I call "transitions()" is doesn't return those events with it.

But, I have a fix in mind that I'm using to hold me over.

I simply changed the definition of the transitions function by combining the transitions of the current node with that of the wildcard.

fsm.transitions = function() { return transitions[this.current].concat(transitions[StateMachine.WILDCARD]); };

It works for now, but I will continue to test and update if I notice any glaring issues with this.

@jakesgordon jakesgordon added BUG v3.0 v2.4 and removed v3.0 labels Nov 18, 2016
@jakesgordon
Owner

Fixed - PR merged (and unit tests fixed/added) for the (upcoming) v2.4 release.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment