fix(451 B06 새로고침 hold): 되돌림 측점 같음 판정 = 초안 얹기 다시 뒤 측점으로 (440-4)

- 초안 둔 채 새로고침 뒤 버림 기록이 saved-diff 로 남던 것 — 다시 얹은 뒤 견줌 · saved

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 22:03:28 +09:00
co-authored by Claude Opus 5.5
parent c4f5530a49
commit db80a22f67
+4 -4
View File
@@ -345,10 +345,6 @@ export async function restoreSectionDetail(
const current = cache.get(key);
if (!current) return null;
const saved = renewed.get(hold.detail) ?? hold.detail; // 그 사이 서버 판이 바뀌었으면 새 판(433-16)
const sections = saved.cross_sections;
const same =
sections.length === stations.length &&
stations.every((station, i) => Math.abs(station.chainageM - sections[i].chainage_m) < 1e-3);
const oldKeys = registeredKeys(
projectId,
routeId,
@@ -371,6 +367,10 @@ export async function restoreSectionDetail(
await withDraftShapes(saved, projectId);
withStructureAreas(saved);
if (cache.get(key) !== saved) return null; // 그 사이 다른 갈아끼움 · 새로 받음
const sections = saved.cross_sections; // 다시 얹은 뒤 측점(440-4)
const same =
sections.length === stations.length &&
stations.every((station, i) => Math.abs(station.chainageM - sections[i].chainage_m) < 1e-3);
emitSwap(saved, moves);
listeners.get(key)?.forEach((fn) => fn(saved, moves));
return { detail: saved, same };