Skip to content

Commit 0cde405

Browse files
committed
fix: 🐛 do not check for sync on local sync
1 parent 335739e commit 0cde405

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/__demos__/ui-text/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const main = async () => {
1010
const repo = new JsonCrdtRepo({
1111
wsUrl: 'wss://demo-iasd8921ondk0.jsonjoy.com/rpc',
1212
});
13-
const id = 'block-sync-ui-demo-text';
14-
const session = await repo.sessions.load({id: [id], remote: {}});
13+
const id = 'block-sync-ui-demo-text-3';
14+
const session = await repo.sessions.load({id: [id], make: {}, remote: {timeout: 1000}});
1515
const model = session.model;
1616
const view = model.view();
1717
if (typeof view !== 'string') model.api.root('');

src/json-crdt-repo/local/level/LevelLocalRepo.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,6 @@ export class LevelLocalRepo implements LocalRepo {
742742
let needsReset = false;
743743
const didPush = await this.lockBlock(keyBase, async () => {
744744
const [tip, meta] = await Promise.all([this.readFrontierTip(keyBase), this.readMeta(keyBase)]);
745-
if (meta.seq > -1 && (typeof req.cursor !== 'number' || req.cursor < meta.seq)) needsReset = true;
746745
let nextTick = meta.time + 1;
747746
cursor = meta.seq;
748747
if (tip) {

0 commit comments

Comments
 (0)