diff --git a/B06_Section/B06_Section_Section_Store.ts b/B06_Section/B06_Section_Section_Store.ts index b4d565544..538a19724 100644 --- a/B06_Section/B06_Section_Section_Store.ts +++ b/B06_Section/B06_Section_Section_Store.ts @@ -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 };