Skip to content

Commit 2ad0cb9

Browse files
committed
Fix FSM going to "*" state for events with both "from" and "to" WILDCARDed.
1 parent fcdd0fa commit 2ad0cb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

state-machine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
return function() {
140140

141141
var from = this.current;
142-
var to = map[from] || map[StateMachine.WILDCARD] || from;
142+
var to = map[from] || (map[StateMachine.WILDCARD] != StateMachine.WILDCARD ? map[StateMachine.WILDCARD] : from) || from;
143143
var args = Array.prototype.slice.call(arguments); // turn arguments into pure array
144144

145145
if (this.transition)

0 commit comments

Comments
 (0)