diff --git a/foundation.go b/foundation.go index ced5b81..7520850 100644 --- a/foundation.go +++ b/foundation.go @@ -72,16 +72,12 @@ func (f *Foundation) calculateNextStep(step int) int { } i := f.currentStep - for { + for i < step { i++ if _, ok := f.interceptors[i]; ok { break } - - if step == i { - break - } } return i