feat(#38): document edit history with diff and compare mode #52

Merged
marcel merged 13 commits from feat/38-document-edit-history into main 2026-03-23 17:27:57 +01:00
Showing only changes of commit f32ed32f67 - Show all commits

View File

@@ -217,7 +217,7 @@ async function selectVersion(versionId: string) {
try {
const idx = versions.findIndex((v) => v.id === versionId);
const newerSnap = await fetchSnapshot(versionId);
const olderSnap = idx + 1 < versions.length ? await fetchSnapshot(versions[idx + 1].id) : null;
const olderSnap = idx > 0 ? await fetchSnapshot(versions[idx - 1].id) : null;
const entries = buildDiff(olderSnap, newerSnap);
if (entries.length === 0) {
noDiff = true;