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 <steveruizok@gmail.com>
This commit is contained in:
Yao Wang 2022-03-02 22:21:14 +08:00 committed by GitHub
parent 971cbfb70c
commit e43219ded8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -56,6 +56,7 @@ function addToShapeTree<T extends TLShape, M extends Record<string, unknown>>(
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

View file

@ -67,6 +67,7 @@
},
"build:www": {
"dependsOn": [
"build:packages",
"^build"
],
"outputs": [