Skip to content

Commit

Permalink
Fix diff self-correction issue: use i index (relates back to #124, …
Browse files Browse the repository at this point in the history
…looks like @AimWhy was right to question that offset). Fixes #159.
  • Loading branch information
developit committed May 24, 2016
1 parent 8353cad commit e8a1924
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vdom/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ function innerDiffNode(dom, vchildren, context, mountAll) {

if (c) deepHook(c, 'componentWillMount');

if (originalChildren[i]!==child) {
let next = originalChildren[i+1];
let next = originalChildren[i];
if (next!==child) {
if (next) {
dom.insertBefore(child, next);
}
Expand Down

0 comments on commit e8a1924

Please sign in to comment.