refactor(editor): applyRepair within the locals limit

This commit is contained in:
bchanot committed 2026-11-04 20:20:38 +01:00
1 parent 9c21fd3f86
commit 46fd861224
1 file changed
+4 -2
+4 -2
View File
@@ -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 })