Fix for null values in CPJSObjectCreateWithJSON. Closes #19

.
This commit is contained in:
Ross Boucher
2009-05-05 13:20:35 -07:00
parent 88d8a409bb
commit 31ed6254db
+1 -1
View File
@@ -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)