Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 0406d3c

Browse files
ianegordonjverkoey
ianegordon
authored andcommitted
Reorder if statement to avoid nullability warning. (#48)
1 parent d583d94 commit 0406d3c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/private/MDMViewControllerTransitionCoordinator.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,10 @@ - (instancetype)initWithTransition:(NSObject<MDMTransition> *)transition
255255
if ([transition respondsToSelector:@selector(canPerformTransitionWithContext:)]) {
256256
id<MDMTransitionWithFeasibility> withFeasibility = (id<MDMTransitionWithFeasibility>)transition;
257257
if (![withFeasibility canPerformTransitionWithContext:_root]) {
258-
transition = nil;
258+
self = nil;
259+
return nil; // No active transitions means no need for a coordinator.
259260
}
260261
}
261-
262-
if (!transition) {
263-
self = nil;
264-
return nil; // No active transitions means no need for a coordinator.
265-
}
266262
}
267263
return self;
268264
}

0 commit comments

Comments
 (0)