Permalink
Browse files

Apply @Thomazr's patch for consistent nil returning in -childrenNamed

  • Loading branch information...
1 parent 9724f33 commit 08604bb90d4d986b847adc59b8ee878c35fb5d11 @nfarina committed Jan 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 SMXMLDocument.m
View
@@ -103,7 +103,7 @@ - (NSArray *)childrenNamed:(NSString *)nodeName {
for (SMXMLElement *child in self.children)
if ([child.name isEqual:nodeName])
[array addObject:child];
- return [array copy];
+ return array.count ? [array copy] : nil;
}
- (SMXMLElement *)childWithAttribute:(NSString *)attributeName value:(NSString *)attributeValue {

0 comments on commit 08604bb

Please sign in to comment.