Auto transforms bugged node pos (#712)

This commit is contained in:
Chenlei Hu
2024-09-02 14:41:45 -04:00
committed by GitHub
parent 9d69db6db7
commit 51b7467012
2 changed files with 21 additions and 1 deletions

View File

@@ -74,7 +74,10 @@ const zProperties = z
.passthrough()
const zVector2 = z.union([
z.object({ 0: z.number(), 1: z.number() }).transform((v) => [v[0], v[1]]),
z
.object({ 0: z.number(), 1: z.number() })
.passthrough()
.transform((v) => [v[0], v[1]]),
z.tuple([z.number(), z.number()])
])