Skip to content

Commit

Permalink
fix(transaction): when an entity is updated more than once, always ke…
Browse files Browse the repository at this point in the history
…ep a reference to the original entity
  • Loading branch information
cbourget authored and mbarbeau committed Aug 7, 2020
1 parent 47fc2e8 commit 1fd0eb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/lib/entity/shared/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export class EntityTransaction {
if (existingOperation.type === EntityOperationType.Insert) {
this.doInsert(current, store, meta);
return;
} else if (existingOperation.type === EntityOperationType.Update) {
previous = existingOperation.previous;
}
}

Expand Down

0 comments on commit 1fd0eb7

Please sign in to comment.