Skip to content

Commit

Permalink
Fixing ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewind committed Jul 14, 2015
1 parent 1e56681 commit 7e25a0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/JSObjectionInjectorEntry.m
Expand Up @@ -55,10 +55,10 @@ - (id)buildObject:(NSArray *)arguments initializer: (SEL) initializer {

id objectUnderConstruction = nil;

if ([self.classEntry respondsToSelector:@selector(objectionInitializer)] || initializer != nil) {
objectUnderConstruction = JSObjectionUtils.buildObjectWithInitializer(self.classEntry, [self initializerForObject], [self argumentsForObject:arguments]);
} else if(initializer != nil) {
if(initializer != nil) {
objectUnderConstruction = JSObjectionUtils.buildObjectWithInitializer(self.classEntry, initializer, arguments);
} else if ([self.classEntry respondsToSelector:@selector(objectionInitializer)]) {
objectUnderConstruction = JSObjectionUtils.buildObjectWithInitializer(self.classEntry, [self initializerForObject], [self argumentsForObject:arguments]);
} else {
objectUnderConstruction = [[self.classEntry alloc] init];
}
Expand Down

0 comments on commit 7e25a0c

Please sign in to comment.