Browse Source

DaydreamController: Fixed null check.

Mr.doob 8 years ago
parent
commit
c4eef2e2fe
1 changed files with 2 additions and 2 deletions
  1. 2 2
      examples/js/vr/DaydreamController.js

+ 2 - 2
examples/js/vr/DaydreamController.js

@@ -53,10 +53,10 @@ THREE.DaydreamController = function () {
 
 		if ( gamepad !== undefined && gamepad.pose !== undefined ) {
 
-			if ( pose === null ) return; // no user action yet
-
 			var pose = gamepad.pose;
 
+			if ( pose === null ) return; // no user action yet
+
 			//  orientation
 
 			if ( pose.orientation !== null ) scope.quaternion.fromArray( pose.orientation );