Skip to content

Commit c30cbef

Browse files
committed
Fix missing filter when setting last_op
1 parent 5bd9e84 commit c30cbef

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/polite-news-sneeze.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@powersync/common': patch
3+
---
4+
5+
Fix applying bucket state around partial syncs.

packages/common/src/client/sync/bucket/SqliteBucketStorage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ export class SqliteBucketStorage extends BaseObserver<BucketStorageListener> imp
154154
return { ready: false, checkpointValid: false, checkpointFailures: r.checkpointFailures };
155155
}
156156

157-
const buckets = checkpoint.buckets;
157+
let buckets = checkpoint.buckets;
158158
if (priority !== undefined) {
159-
buckets.filter((b) => hasMatchingPriority(priority, b));
159+
buckets = buckets.filter((b) => hasMatchingPriority(priority, b));
160160
}
161161
const bucketNames = buckets.map((b) => b.bucket);
162162
await this.writeTransaction(async (tx) => {

0 commit comments

Comments
 (0)