xstate-viz icon indicating copy to clipboard operation
xstate-viz copied to clipboard

Application error on certain invalid configurations

Open jeroenverfallie opened this issue 4 years ago • 1 comments

Stumbled upon a full nextjs 'Application crash' while writing an invalid machine config.

Reproduction case:

createMachine({
    id: "application error",
    initial: "loading",
    states: {
        loading: {
            entry: {
                target: "list"
            }
        },
        list: {}
    }
})

Crashes immediately on edit, even before hitting Visualize. The crash persist after refresh, so you are forced to either clear the application storage, or quickly change the editor before it triggers.

image

jeroenverfallie avatar Sep 07 '21 11:09 jeroenverfallie

I've encountered something similar, except for me it was when I saved machine with a target to a missing state (was about to add it).

Repro link: https://stately.ai/viz/8b20be22-3792-40f8-92e1-6761fae625bb

nobrayner avatar Nov 05 '21 01:11 nobrayner