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:
parent
971cbfb70c
commit
e43219ded8
2 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
},
|
||||
"build:www": {
|
||||
"dependsOn": [
|
||||
"build:packages",
|
||||
"^build"
|
||||
],
|
||||
"outputs": [
|
||||
|
|
Loading…
Reference in a new issue