Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #23 from Bertrand/6b5ea5c1ffddf99b3ee2cd2c9e938027…

…e77faa1f

Compatibility with older sdks
  • Loading branch information...
commit db40d0920d8fe2fcb54e26bd47d47896bee77275 2 parents 7d439d8 + 6b5ea5c
@groue authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/classes/GRMustacheContext.m
View
6 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.