mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-02 03:08:22 +00:00
Fixed dictionaryWithJSObject on arrays with null values
This commit is contained in:
1 parent
aac09d8208
commit
5d26066e02
1 file changed
+11
-4
@@ -176,11 +176,18 @@
|
||||
for (; i < count; i++)
|
||||
{
|
||||
var thisValue = value[i];
|
||||
|
||||
if (thisValue.constructor === Object)
|
||||
newValue.push([CPDictionary dictionaryWithJSObject:thisValue recursively:YES]);
|
||||
|
||||
if (thisValue === null)
|
||||
{
|
||||
newValue.push([CPNull null]);
|
||||
}
|
||||
else
|
||||
newValue.push(thisValue);
|
||||
{
|
||||
if (thisValue.constructor === Object)
|
||||
newValue.push([CPDictionary dictionaryWithJSObject:thisValue recursively:YES]);
|
||||
else
|
||||
newValue.push(thisValue);
|
||||
}
|
||||
}
|
||||
|
||||
value = newValue;
|
||||
|
||||
Reference in new issue
Block a user