From 46fd861224699d9fbfe66deb3b1981a75705295c Mon Sep 17 00:00:00 2001 From: bchanot Date: Wed, 4 Nov 2026 20:20:38 +0100 Subject: [PATCH] refactor(editor): applyRepair within the locals limit --- apps/app/src/editor/repair.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/app/src/editor/repair.ts b/apps/app/src/editor/repair.ts index 296e7119..a9736147 100644 --- a/apps/app/src/editor/repair.ts +++ b/apps/app/src/editor/repair.ts @@ -308,8 +308,10 @@ export function applyRepair( ): RepairResult { const store = useEditorStore.getState() const before = store.previewState - const live = before !== null && store.session === offer.session - const batch = live ? repairBatch(offer, before, geometries) : null + const batch = + before && store.session === offer.session + ? repairBatch(offer, before, geometries) + : null if (!before || !batch) return blockedResult(context) const accept = repairAccept(before, offer.assetId, batch.ids) const outcome = store.commitBatch(batch.commands, { accept })