Skip to content

Commit

Permalink
Fix next node logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed May 29, 2012
1 parent 4b55763 commit aed7419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion List.js
Expand Up @@ -415,7 +415,7 @@ function(arrayUtil, kernel, declare, listen, aspect, has, miscUtil, TouchScroll,
}
if(to > -1){
// add to new slot (either before an existing row, or at the end)
row = self.newRow(object, rows[to] || (rows[to-1] && rows[to-1].nextSibling) || beforeNode, to, options);
row = self.newRow(object, rows[to] || beforeNode.parentNode ? beforeNode : (rows[to-1] && rows[to-1].nextSibling), to, options);
if(row){
row.observerIndex = observerIndex;
rows.splice(to, 0, row);
Expand Down

0 comments on commit aed7419

Please sign in to comment.