Permalink
Browse files

fixing bug in milestone reordering

  • Loading branch information...
1 parent aa5a879 commit 12903bede49777805459fa9f933bd5054c8450de @rauhryan rauhryan committed Mar 1, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 public/scripts/modules/workqueue/views/milestones_list.js
@@ -23,8 +23,11 @@ define(["./milestoneView","../collections/milestones"],function(milestoneView,mi
onStop : function(ev,ui){
var elements = $("li", this.el),
index = elements.index(ui.item),
- first = index == 0,
- last = index == elements.size() - 1,
+
+ if(index === -1) { return; }
+
+ first = index === 0,
+ last = index === elements.size() - 1,
currentElement = $(ui.item),
currentData = currentElement.data("milestone"),
beforeElement = elements.get(index ? index - 1 : index),

0 comments on commit 12903be

Please sign in to comment.