diff --git a/Foundation/CPArray.j b/Foundation/CPArray.j index 67082d555..f98dfb2ef 100755 --- a/Foundation/CPArray.j +++ b/Foundation/CPArray.j @@ -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 + ')'; }