Skip to content

Commit

Permalink
Fix for null values in CPJSObjectCreateWithJSON. Closes #19
Browse files Browse the repository at this point in the history
.
  • Loading branch information
Ross Boucher committed May 5, 2009
1 parent 88d8a40 commit 31ed625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Foundation/CPValue.j
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function CPJSObjectCreateJSON(aJSObject)
// typeof new Number() and new String() gives you "object",
// so valueof in those cases.
var type = typeof aJSObject,
valueOf = aJSObject.valueOf(),
valueOf = aJSObject ? aJSObject.valueOf() : null,
typeValueOf = typeof valueOf;

if (type != typeValueOf)
Expand Down

0 comments on commit 31ed625

Please sign in to comment.