Skip to content

Commit 35fa59c

Browse files
committed
clarify a slightly confusing comment
1 parent 41db8e8 commit 35fa59c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

state-machine.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
SUCCEEDED: 1, // the event transitioned successfully from one state to another
1313
NOTRANSITION: 2, // the event was successfull but no state transition was necessary
1414
CANCELLED: 3, // the event was cancelled by the caller in a beforeEvent callback
15-
ASYNC: 4 // the event is asynchronous and the caller is in control of when the transition occurs
15+
ASYNC: 4 // the event is asynchronous and the caller is in control of when the transition occurs
1616
},
1717

1818
Error: {
@@ -137,8 +137,8 @@
137137
return StateMachine.Result.ASYNC;
138138
}
139139
else {
140-
if (this.transition)
141-
return this.transition(); // in case user manually called transition() but forgot to return ASYNC
140+
if (this.transition) // need to check in case user manually called transition() but forgot to return StateMachine.ASYNC
141+
return this.transition();
142142
}
143143

144144
};

0 commit comments

Comments
 (0)