|
@@ -76,7 +76,7 @@ export class FSM<T extends string, Data = any> {
|
|
|
* Returns an array of state to which the machine may transition from the current state.
|
|
* Returns an array of state to which the machine may transition from the current state.
|
|
|
*/
|
|
*/
|
|
|
getNextStates(): ReadonlyArray<T> {
|
|
getNextStates(): ReadonlyArray<T> {
|
|
|
- return this.config.transitions[this._currentState].to;
|
|
|
|
|
|
|
+ return this.config.transitions[this._currentState]?.to ?? [];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|