Browse files

Quick fix.

  • Loading branch information...
1 parent f0586c5 commit bb046116231fa535f1e34913fde9e39cf4fb2c81 @ccgus committed Apr 5, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 jscocoa/JSCocoa/JSCocoaController.m
View
5 jscocoa/JSCocoa/JSCocoaController.m
@@ -3812,7 +3812,10 @@ static bool jsCocoaObject_setProperty(JSContextRef ctx, JSObjectRef object, JSSt
id property = NULL;
if ([JSCocoaFFIArgument unboxJSValueRef:jsValue toObject:&property inContext:ctx])
{
- [dictionary setObject:property forKey:propertyName];
+ if (property) { // false values will unbox to nil sometime. Ie, dict['whatever'] = false;
+ [dictionary setObject:property forKey:propertyName];
+ }
+
return true;
}
else return false;

0 comments on commit bb04611

Please sign in to comment.