Explorar o código

stay defensive, stay safe

Raanan Weber %!s(int64=4) %!d(string=hai) anos
pai
achega
b7b63cc54d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/XR/features/WebXRControllerTeleportation.ts

+ 1 - 1
src/XR/features/WebXRControllerTeleportation.ts

@@ -764,7 +764,7 @@ export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
 
     private _teleportForward(controllerId: string) {
         const controllerData = this._controllers[controllerId];
-        if (!controllerData.teleportationState.forward) {
+        if (!controllerData || !controllerData.teleportationState.forward) {
             return;
         }
         controllerData.teleportationState.forward = false;