Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Bug: onDone appears in state.nextEvents even if compound node is not in final state  #403

@eponymous301

Description

@eponymous301

Description

Given machine in initial state (see image), state.nextEvents includes an entry for the onDone transition. (And transition can be fired by clicking on onDone in the inspector)

Screen Shot 2023-02-25 at 3 02 19 PM

Expected result

  • state.nextEvents == [ "start" ]
  • onDone transition is disabled in inspector

Actual result

  • state.nextEvents == [ "done.state.test.First State", "start" ]
  • onDone transition is enabled in inspector
    • clicking causes "Second State" to become the current state.

Reproduction

https://stately.ai/viz/dafd285c-17f4-429e-b16c-9b58d0e96222

Additional context

Local env is below, but viz URL for "Reproduction" above also shows onDone enabled and clickable (although State.nextEvents is not exposed in UI so I can't verify that it also includes an entry for it)

OS X 10.15.7
node v18.12.1
vue@3.2.47
xstate@4.36.0
@xstate/vue@2.0.0
@xstate/inspect@0.7.1

xstate-viz-app@0.8.5 running locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions