Permalink
Browse files

Merge pull request #23 from Bertrand/6b5ea5c1ffddf99b3ee2cd2c9e938027…

…e77faa1f

Compatibility with older sdks
  • Loading branch information...
2 parents 7d439d8 + 6b5ea5c commit db40d0920d8fe2fcb54e26bd47d47896bee77275 @groue committed Sep 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/classes/GRMustacheContext.m
@@ -198,8 +198,10 @@ + (BOOL)objectIsFoundationCollectionWhoseImplementationOfValueForKeyReturnsAnoth
if (objectIMPL == NSManagedObjectIMPL) {
return NO;
}
-
- if ([object isKindOfClass:[NSArray class]] || [object isKindOfClass:[NSSet class]] || [object isKindOfClass:[NSOrderedSet class]]) {
+
+ // NSOrderedSet is iOS >= 5 or OSX >= 10.7. Don't name it directly.
+ Class NSOrderedSetClass = NSClassFromString(@"NSOrderedSet");
+ if ([object isKindOfClass:[NSArray class]] || [object isKindOfClass:[NSSet class]] || (NSOrderedSetClass && [object isKindOfClass:NSOrderedSetClass])) {
return YES;
}

0 comments on commit db40d09

Please sign in to comment.