Skip to content

Commit

Permalink
Fix -[RKObjectMapping mappingForSourceKeyPath:] when sourceKeyPath is…
Browse files Browse the repository at this point in the history
… nil

Closes RestKit#1937
  • Loading branch information
segiddins committed Jun 10, 2014
1 parent 09dc01a commit 0bbd749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/ObjectMapping/RKObjectMapping.m
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ - (NSString *)description
- (id)mappingForSourceKeyPath:(NSString *)sourceKeyPath
{
for (RKPropertyMapping *mapping in self.propertyMappings) {
if ([mapping.sourceKeyPath isEqualToString:sourceKeyPath]) {
if (mapping.sourceKeyPath == sourceKeyPath || [mapping.sourceKeyPath isEqualToString:sourceKeyPath]) {
return mapping;
}
}
Expand Down

0 comments on commit 0bbd749

Please sign in to comment.