Permalink
Browse files

fixed out of range error which resulted in a nil indexPath

  • Loading branch information...
1 parent c3f300b commit 9232f0a992f35556088659ba707fdf16e0e567a7 @bhauman committed May 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 GestureTable/app/gesture_recognizer.rb
@@ -46,7 +46,7 @@ def scrollTable
def updateAddingIndexPathForCurrentLocation
indexPath = indexPathFromRecognizer(@longPressRecognizer)
- if indexPath != @addingIndexPath
+ if indexPath && indexPath != @addingIndexPath
@tableView.beginUpdates
@tableView.deleteRowsAtIndexPaths([@addingIndexPath], withRowAnimation: UITableViewRowAnimationNone)
@tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimationNone)

0 comments on commit 9232f0a

Please sign in to comment.