Don't try to use an undefined transition list
continuous-integration/drone/push Build is passing Details

main
Clément FRÉVILLE 1 year ago
parent b4e06d05c5
commit fc555efbc0

@ -95,9 +95,11 @@ 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];
if (transitions) {
newStates.push(...transitions); newStates.push(...transitions);
} }
} }
}
state = newStates; state = newStates;
updateUIState(); updateUIState();
} }

Loading…
Cancel
Save