Add null check for activeEntityPreview in viewport-host.ts

This commit is contained in:
2026-04-15 15:02:14 +02:00
parent 6bfcbd6a9c
commit 567fa62b7d

View File

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