diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index b247c098..cee7fcd7 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -1546,7 +1546,11 @@ export class ViewportHost { (item) => item.entityId === session.target.activeEntityId ); - switch (activeEntityPreview?.rotation.kind) { + if (activeEntityPreview === undefined) { + return null; + } + + switch (activeEntityPreview.rotation.kind) { case "yaw": return this.createRotationQuaternion({ x: 0,