Permalink
Browse files

Handle nil in toJS (mringel)

  • Loading branch information...
1 parent a6cb2e2 commit 46ce56ef86cc4e65c3fafc84b5d0cb1833bb2b8f @parmanoir committed Oct 21, 2012
@@ -949,6 +949,9 @@ - (JSValueRef)_toJS:(id)object {
}
return jsDict;
}
+ else if (object == nil || [object isKindOfClass:[NSNull class]]) {
+ return JSValueMakeNull(ctx);
+ }
NSLog(@"Don't know how to convert %@, boxing it", object);
return [self boxObject:object];
}

0 comments on commit 46ce56e

Please sign in to comment.