diff --git a/packages/editor/src/lib/editor/derivations/parentsToChildren.ts b/packages/editor/src/lib/editor/derivations/parentsToChildren.ts index 62d9d4f67..5212beea9 100644 --- a/packages/editor/src/lib/editor/derivations/parentsToChildren.ts +++ b/packages/editor/src/lib/editor/derivations/parentsToChildren.ts @@ -7,6 +7,7 @@ type Parents2Children = Record export const parentsToChildren = (store: TLStore) => { const shapeIdsQuery = store.query.ids<'shape'>('shape') + const shapeHistory = store.query.filterHistory('shape') function fromScratch() { const result: Parents2Children = {} @@ -35,7 +36,7 @@ export const parentsToChildren = (store: TLStore) => { return fromScratch() } - const diff = store.history.getDiffSince(lastComputedEpoch) + const diff = shapeHistory.getDiffSince(lastComputedEpoch) if (diff === RESET_VALUE) { return fromScratch()