File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,12 @@ fileprivate extension StateViewController {
506
506
return false
507
507
}
508
508
509
+ // We may not have made any changes to content view controllers, even though we have changed the state.
510
+ // Therefore, we must be prepare to end the state transition immediately.
511
+ defer {
512
+ endStateTransitionIfNeeded ( animated: animated)
513
+ }
514
+
509
515
// If we're transitioning between states, we need to abort and wait for the current state
510
516
// transition to finish.
511
517
guard isTransitioningBetweenStates == false else {
@@ -517,11 +523,6 @@ fileprivate extension StateViewController {
517
523
willTransition ( to: state, animated: animated)
518
524
dispatchStateEvent ( . willTransitionTo( nextState: state, animated: animated) )
519
525
520
- // We may not have made any changes to content view controllers, even though we have changed the state.
521
- // Therefore, we must be prepare to end the state transition immediately.
522
- defer {
523
- endStateTransitionIfNeeded ( animated: animated)
524
- }
525
526
526
527
// Note that we're transitioning from a state
527
528
transitioningFromState = state
You can’t perform that action at this time.
0 commit comments