Skip to content

Commit

Permalink
Rollback edits in reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney committed Jan 24, 2025
1 parent ea5a811 commit 13e2486
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class DefaultEditablePlanDriver(

val result = uncommittedChanges
uncommittedChanges = mutableListOf()
for (edit in result) {
for (edit in result.reversed()) {
when (edit) {
is Edit.Create -> adapter.delete(edit.directive.id)
is Edit.Delete -> adapter.create(edit.directive)
Expand Down

0 comments on commit 13e2486

Please sign in to comment.