You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my current project, I realized my code would benefit a lot by the possibility of throwing an exception and catching it when a transition is cancelled (because in my case the transition is cancelled if some particular conditions are not met).
I've modified my fork of javascript-state-machine to include a new handler called "onCancelledTransition" that by default returns false (as expected) when a transition is cancelled, but it allows a custom implementation of onCancelledTransition handler where you can throw an error whenever one of a set of particular lifecycle events returns false (the same as onInvalidTransition and onPendingTransition).
Does the project is interested in my addition (cancelledTransition)? I could made a PR if so.
The text was updated successfully, but these errors were encountered:
Good day!
In my current project, I realized my code would benefit a lot by the possibility of throwing an exception and catching it when a transition is cancelled (because in my case the transition is cancelled if some particular conditions are not met).
I've modified my fork of javascript-state-machine to include a new handler called "onCancelledTransition" that by default returns
false
(as expected) when a transition is cancelled, but it allows a custom implementation ofonCancelledTransition
handler where you can throw an error whenever one of a set of particular lifecycle events returns false (the same asonInvalidTransition
andonPendingTransition
).Does the project is interested in my addition (cancelledTransition)? I could made a PR if so.
The text was updated successfully, but these errors were encountered: