diff --git a/transition.go b/transition.go index 2c50ce6..14422f0 100644 --- a/transition.go +++ b/transition.go @@ -25,6 +25,9 @@ func NewTransition(trigger string, source State, dest State) Transitioner { func (r *Transition) Run(m Modeler) error { currentState := m.InspectState() + if currentState == r.dest { + return nil + } if currentState == r.source || r.source == "*" { res := m.ChangeState(r.dest) if res == currentState {