Skip to content

Commit d77fff3

Browse files
committed
fix tests broken by PR jakesgordon#97
1 parent acc93f2 commit d77fff3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

state-machine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
fsm.is = function(state) { return Array.isArray(state) ? (state.indexOf(this.current) >= 0) : (this.current === state); };
7979
fsm.can = function(event) { return !this.transition && (map[event].hasOwnProperty(this.current) || map[event].hasOwnProperty(StateMachine.WILDCARD)); }
8080
fsm.cannot = function(event) { return !this.can(event); };
81-
fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD]); };
81+
fsm.transitions = function() { return (transitions[this.current] || []).concat(transitions[StateMachine.WILDCARD] || []); };
8282
fsm.isFinished = function() { return this.is(terminal); };
8383
fsm.error = cfg.error || function(name, from, to, args, error, msg, e) { throw e || msg; }; // default behavior when something unexpected happens is to throw an exception, but caller can override this behavior if desired (see github issue #3 and #17)
8484

state-machine.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)