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

chore: fix a non working example in README.md #12

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

faridevnz
Copy link
Contributor

The current version of the example fails with:

throw new InvalidTransitionCondition("State must have valid transition condition (autoTransition or transitionGuard) if not final");

@marco-ippolito
Copy link
Owner

I think the error itself is wrong.
A state if not final should have either autoTransition or transitionTo.
transitionGuard should always be optional

src/validate.ts Outdated Show resolved Hide resolved
@marco-ippolito marco-ippolito merged commit aa522e6 into marco-ippolito:master Nov 23, 2023
4 checks passed
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 this pull request may close these issues.

2 participants