This commit is contained in:
Andras Schmelczer 2026-09-26 20:22:16 +01:00
commit b07aa589ff

View file

@ -48,17 +48,14 @@ export function applyLocalChange(
)) ||
uuid());
next.local[id] = change.path;
next.documents[id] ??= {
materialized: true,
bootstrap: initial?.fileManifest.entries[id] !== undefined
};
next.documents[id] ??= { observedHash: "" };
return;
}
const from = change.type === "move" ? change.oldPath : change.path;
change.identities ??= Object.fromEntries(
Object.entries(next.local).filter(
([id, path]) =>
next.documents[id]?.materialized &&
next.documents[id]?.observedHash !== undefined &&
(path === from || path.startsWith(from + "/"))
)
);