Browse Source

Merge pull request #16856 from takahirox/SupportsSessionCatch

WebVR: Catch xr.supportsSession() rejection
Mr.doob 6 years ago
parent
commit
86026807e5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/vr/WebVR.js

+ 1 - 1
examples/js/vr/WebVR.js

@@ -136,7 +136,7 @@ var WEBVR = {
 
 			stylizeElement( button );
 
-			navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR );
+			navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showVRNotFound );
 
 			return button;