Don't try to use an undefined transition list
This commit is contained in:
@@ -95,7 +95,9 @@ export function openAutomaton(name, states, editable = false) {
|
|||||||
for (const s of state) {
|
for (const s of state) {
|
||||||
if (s in states) {
|
if (s in states) {
|
||||||
const transitions = states[s].transitions[letter];
|
const transitions = states[s].transitions[letter];
|
||||||
newStates.push(...transitions);
|
if (transitions) {
|
||||||
|
newStates.push(...transitions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state = newStates;
|
state = newStates;
|
||||||
|
Reference in New Issue
Block a user