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>
pull/603/head
Yao Wang 2022-03-02 22:21:14 +08:00 zatwierdzone przez GitHub
rodzic 971cbfb70c
commit e43219ded8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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

Wyświetl plik

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