Skip to content

Commit

Permalink
Don't commit when aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed Feb 9, 2022
1 parent 4fb0342 commit 42ea106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/firestore/src/local/simple_db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class SimpleDbTransaction {
// speed up index DB processing if the event loop remains blocks.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const maybeV3IndexedDb = this.transaction as any;
if (typeof maybeV3IndexedDb.commit === 'function') {
if (!this.aborted && typeof maybeV3IndexedDb.commit === 'function') {
maybeV3IndexedDb.commit();
}
}
Expand Down

0 comments on commit 42ea106

Please sign in to comment.