mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fixed: Using keyboard navigation in empty CPCollectionView threw exception.
This commit is contained in:
@@ -1217,7 +1217,10 @@ Not supported. Use -collectionView:dataForItemsAtIndexes:fortype:
|
||||
|
||||
- (void)_modifySelectionWithNewIndex:(int)anIndex direction:(int)aDirection expand:(BOOL)shouldExpand
|
||||
{
|
||||
anIndex = MIN(MAX(anIndex, 0), [[self items] count] - 1);
|
||||
var count = [[self items] count];
|
||||
if (count === 0)
|
||||
return;
|
||||
anIndex = MIN(MAX(anIndex, 0), count - 1);
|
||||
|
||||
if (_allowsMultipleSelection && shouldExpand)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user