Преглед изворни кода

Catch xr.supportsSession() rejection

Takahiro пре 6 година
родитељ
комит
d6907618cd
1 измењених фајлова са 1 додато и 1 уклоњено
  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;