Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualize fails if no target is specified for an event #38

Open
karfau opened this issue Jun 19, 2020 · 0 comments
Open

visualize fails if no target is specified for an event #38

karfau opened this issue Jun 19, 2020 · 0 comments

Comments

@karfau
Copy link

karfau commented Jun 19, 2020

The main case I'm aware of is when an event only triggers actions but doesn't change the state.

{
  "initial": "initial",
  "states": {
    "initial": {
      "on": {
        "LOG": {
          "actions": ["log"]
        }
      }
    }
  }
}

I know the example doesn't make a lot of sense on it's own, but it's a minimal reproduction case.
It is displayed correctly in the interactive viz but fails in this sandbox with latest versions of xstate and xstate-plantuml

I tweaked the code to get some output for a state machine that makes heavy use of it, but I'm not sure the way I have done it considers all cases.

karfau referenced this issue in karfau/xstate-plantuml Jun 19, 2020
- Makes it possible to pass an empty target as described in #38 without causing syntax errors.
@karfau karfau changed the title visualize fails if an no target is specified for an event visualize fails if no target is specified for an event Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant