From e43219ded81667b848b4fdaae83efc526dd2153b Mon Sep 17 00:00:00 2001 From: Yao Wang <7734046+Soyn@users.noreply.github.com> Date: Wed, 2 Mar 2022 22:21:14 +0800 Subject: [PATCH] fix(import): make sure every shape is in page (#599) * fix(import): make sure every shape is in page - only to add the shape is in page shapes -https://gist.github.com/cangoektas/4a84e2d48f6e2551b8b3a632ae1b4f71 Closes #554 * Update useShapeTree.tsx * Update useShapeTree.tsx * Update turbo.json Co-authored-by: Steve Ruiz --- packages/core/src/hooks/useShapeTree.tsx | 1 + turbo.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/core/src/hooks/useShapeTree.tsx b/packages/core/src/hooks/useShapeTree.tsx index 4796176ae..0a02b4546 100644 --- a/packages/core/src/hooks/useShapeTree.tsx +++ b/packages/core/src/hooks/useShapeTree.tsx @@ -56,6 +56,7 @@ function addToShapeTree>( shape.children .map((id) => shapes[id]) + .filter(Boolean) // TODO: Find cases where shapes would be missing. .sort((a, b) => a.childIndex - b.childIndex) .forEach((childShape) => // eslint-disable-next-line @typescript-eslint/no-non-null-assertion diff --git a/turbo.json b/turbo.json index 8d3155f26..cfb69cdc1 100644 --- a/turbo.json +++ b/turbo.json @@ -67,6 +67,7 @@ }, "build:www": { "dependsOn": [ + "build:packages", "^build" ], "outputs": [