Skip to content

Commit

Permalink
reverted changes to firstOrNil and lastOrNil
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinEberhardt committed Sep 8, 2013
1 parent 8fd943d commit 7552a5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NSArray+LinqExtensions.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ - (id)aggregate:(MSLINQAccumulator)accumulator

- (id)firstOrNil
{
return self.count ? nil : self[0];
return self.count == 0 ? nil : self[0];
}

- (id)lastOrNil
{
return self.count ? nil : self[self.count-1];
return self.count == 0 ? nil : self[self.count-1];
}

- (NSArray*)skip:(NSUInteger)count
Expand Down

0 comments on commit 7552a5a

Please sign in to comment.