Skip to content

Commit

Permalink
fix endless loop when re-offsetting postponed updates (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
knaeckeKami authored Nov 24, 2023
1 parent f757e8f commit 9ea4aba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/diffutil_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ class DiffResult<T> {
if (update.posInOwnerList == posInList && update.removal == removal) {
postponedUpdate = update;
postponedUpdates.removeAt(i);
i++;
break;
}
i++;
Expand All @@ -566,6 +567,7 @@ class DiffResult<T> {
} else {
update.currentPos++;
}
i++;
}
return postponedUpdate;
}
Expand Down

0 comments on commit 9ea4aba

Please sign in to comment.