Skip to content

Commit f4d140b

Browse files
committed
Run prettier
1 parent afc182e commit f4d140b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.changeset/fix-writeinsert-optimistic-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const todosCollection = createCollection(
3030
// User inserts with temporary ID
3131
todosCollection.insert({
3232
id: -1234, // Temporary negative ID
33-
title: "Task"
33+
title: "Task",
3434
})
3535

3636
// Server returns real ID, but UI would still show -1234 instead of the real ID

packages/db/src/collection/state.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,9 @@ export class CollectionStateManager<
668668
// Always overlay any still-active optimistic transactions so mutations that started
669669
// after the truncate snapshot are preserved.
670670
for (const transaction of this.transactions.values()) {
671-
if (![`completed`, `failed`, `persisting`].includes(transaction.state)) {
671+
if (
672+
![`completed`, `failed`, `persisting`].includes(transaction.state)
673+
) {
672674
for (const mutation of transaction.mutations) {
673675
if (
674676
this.isThisCollection(mutation.collection) &&

0 commit comments

Comments
 (0)