Revert to addObject if there are no sort descriptors in insert...sortedby.

Closes #764.
This commit is contained in:
Ross Boucher committed 2010-07-28 15:48:25 -07:00
1 parent aea19c5cd0
commit b4dbe422ff
1 file changed
+6
+6
View File
@@ -507,6 +507,12 @@
- (unsigned)insertObject:(id)anObject inArraySortedByDescriptors:(CPArray)descriptors
{
if (!descriptors || ![descriptors count])
{
[self addObject:anObject];
return [self count] - 1;
}
var index = [self _insertObject:anObject sortedByFunction:function(lhs, rhs)
{
var i = 0,