Skip to content

Commit 0bbd749

Browse files
committed
Fix -[RKObjectMapping mappingForSourceKeyPath:] when sourceKeyPath is nil
Closes RestKit#1937
1 parent 09dc01a commit 0bbd749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Code/ObjectMapping/RKObjectMapping.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ - (NSString *)description
271271
- (id)mappingForSourceKeyPath:(NSString *)sourceKeyPath
272272
{
273273
for (RKPropertyMapping *mapping in self.propertyMappings) {
274-
if ([mapping.sourceKeyPath isEqualToString:sourceKeyPath]) {
274+
if (mapping.sourceKeyPath == sourceKeyPath || [mapping.sourceKeyPath isEqualToString:sourceKeyPath]) {
275275
return mapping;
276276
}
277277
}

0 commit comments

Comments
 (0)