Don't try to use an undefined transition list

This commit is contained in:
2024-03-25 21:12:10 +01:00
parent b4e06d05c5
commit fc555efbc0

View File

@@ -95,7 +95,9 @@ export function openAutomaton(name, states, editable = false) {
for (const s of state) {
if (s in states) {
const transitions = states[s].transitions[letter];
newStates.push(...transitions);
if (transitions) {
newStates.push(...transitions);
}
}
}
state = newStates;