mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-30 20:07:36 +00:00
Fix for -description in CPArray containing null or undefined values.
Reviewed by me.
This commit is contained in:
1 parent
787e0c8afd
commit
38273e4dab
1 file changed
+13
-8
+13
-8
@@ -787,18 +787,23 @@
|
||||
*/
|
||||
- (CPString)description
|
||||
{
|
||||
var i = 0,
|
||||
var index = 0,
|
||||
count = [self count],
|
||||
description = '(';
|
||||
|
||||
for(; i < count; ++i)
|
||||
|
||||
for(; index < count; ++index)
|
||||
{
|
||||
if (self[i].isa) description += [self[i] description];
|
||||
else description += self[i];
|
||||
|
||||
if (i != count - 1) description += ", ";
|
||||
var object = self[index];
|
||||
|
||||
if (object && object.isa)
|
||||
description += [object description];
|
||||
else
|
||||
description += object;
|
||||
|
||||
if (index !== count - 1)
|
||||
description += ", ";
|
||||
}
|
||||
|
||||
|
||||
return description + ')';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user