Silent invalid states when building a graph
This commit is contained in:
@@ -47,7 +47,7 @@ export function openAutomaton(states, editable = false) {
|
|||||||
*/
|
*/
|
||||||
function updateUIState() {
|
function updateUIState() {
|
||||||
wordInput.value = builder;
|
wordInput.value = builder;
|
||||||
if (typeof Array.from(state).find((state) => states[state].accepting) === 'undefined') {
|
if (typeof Array.from(state).find((state) => states[state]?.accepting) === 'undefined') {
|
||||||
light.classList.remove(IS_VALID);
|
light.classList.remove(IS_VALID);
|
||||||
light.classList.add(IS_INVALID);
|
light.classList.add(IS_INVALID);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user