From 39caf1a495f535da625ec2a91e906938b8a7e4bd Mon Sep 17 00:00:00 2001 From: raihan Date: Wed, 4 May 2016 14:51:15 +0600 Subject: [PATCH] Corrected logic for 'shouldn't try to map the string objects inside the array', Otherwise was giving exception on test suit. --- OCMapper/Source/ObjectMapper.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OCMapper/Source/ObjectMapper.m b/OCMapper/Source/ObjectMapper.m index 4b80dd6..09453d8 100644 --- a/OCMapper/Source/ObjectMapper.m +++ b/OCMapper/Source/ObjectMapper.m @@ -136,10 +136,10 @@ - (NSArray *)processDictionaryFromArray:(NSArray *)array - (id)processDictionaryFromObject:(NSObject *)object { // For example when we are mapping an array of string, we shouldn't try to map the string objects inside the array - if ([NSBundle mainBundle] != [NSBundle bundleForClass:object.class] && [object class] != [NSArray class]) - { - return object; - } + if ([object class] == [NSArray class]) + { + return object; + } NSMutableDictionary *props = [NSMutableDictionary dictionary];