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

.actions() has nonsense response when used on a state with no actions #1072

Closed
StoneCypher opened this issue Jul 25, 2022 · 0 comments
Closed
Labels

Comments

@StoneCypher
Copy link
Owner

As expected:

> const bar = jssm.from(`a 'quuz' -> b;`, {data: 'bob'});
undefined

> bar.actions();
[ 'quuz' ]

> bar.actions('a');
[ 'quuz' ]

Failing:

> bar.actions('b');
Uncaught JssmError: No such state "b" (at "a")
    at Machine.actions (C:\Users\john\projects\jssm\dist\jssm.es5.cjs.js:1:303480) {
  base_message: 'No such state "b"',
  requested_state: undefined
}

Blocks #703

@StoneCypher StoneCypher added this to the Language features milestone Jul 25, 2022
StoneCypher added a commit to StoneCypher/jssm that referenced this issue Jan 1, 2024
Addresses erroneous .actions behavior on missing action nodes, fixes StoneCypher/fsl#1071, fixes StoneCypher/fsl#1072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant