()
| 436 | |
| 437 | // Tell collection that something has changed with the transaction |
| 438 | touchCollection(): void { |
| 439 | const hasCalled = new Set() |
| 440 | for (const mutation of this.mutations) { |
| 441 | if (!hasCalled.has(mutation.collection.id)) { |
| 442 | mutation.collection._state.onTransactionStateChange() |
| 443 | |
| 444 | // Only call commitPendingTransactions if there are pending sync transactions |
| 445 | if (mutation.collection._state.pendingSyncedTransactions.length > 0) { |
| 446 | mutation.collection._state.commitPendingTransactions() |
| 447 | } |
| 448 | |
| 449 | hasCalled.add(mutation.collection.id) |
| 450 | } |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | /** |
| 455 | * Commit the transaction and execute the mutation function |
no test coverage detected