Skip to content

Commit

Permalink
Fixed index out of bounds error
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Batteau committed Jun 1, 2016
1 parent 1646272 commit 03d0c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pod/Classes/KolodaView/KolodaView.swift
Expand Up @@ -639,7 +639,7 @@ public class KolodaView: UIView, DraggableCardDelegate {
let currentItemsCount = countOfCards
let visibleIndexes = [Int](indexRange).filter { $0 >= currentCardIndex && $0 < currentCardIndex + countOfVisibleCards }
if !visibleIndexes.isEmpty {
proceedDeletionInRange(visibleIndexes[0]..<visibleIndexes[visibleIndexes.count])
proceedDeletionInRange(visibleIndexes[0]..<visibleIndexes[visibleIndexes.count - 1])
}
loadMissingCards(missingCardsCount())
layoutDeck()
Expand Down

0 comments on commit 03d0c32

Please sign in to comment.