mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 21:47:04 +00:00
Fixed: The init method ’initWithObjects:count:’ for CPArray did not work on native CPJavaScriptArray when ’count’ is not the same as the length on the provided array.
A test case for this is also added in the test class CPArrayTest
This commit is contained in:
@@ -91,7 +91,7 @@ var concat = Array.prototype.concat,
|
||||
- (id)initWithObjects:(CPArray)objects count:(CPUInteger)aCount
|
||||
{
|
||||
if ([objects isKindOfClass:_CPJavaScriptArray])
|
||||
return slice.call(objects, 0);
|
||||
return slice.call(objects, 0, aCount);
|
||||
|
||||
var array = [],
|
||||
index = 0;
|
||||
|
||||
Reference in New Issue
Block a user