Skip to content

Commit

Permalink
VRButton: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Mar 31, 2022
1 parent 0da9a14 commit 149069f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/jsm/webxr/VRButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,9 @@ class VRButton {

if ( 'xr' in navigator ) {

// WebXRViewer (based on Firefox) has a bug where addEventListener
// WebXRViewer (based on Firefox) has a bug where addEventListener
// throws a silent exception and aborts execution entirely.
const isWebXRViewer = /WebXRViewer\//i.test( navigator.userAgent );
if( isWebXRViewer ) return;
if ( /WebXRViewer\//i.test( navigator.userAgent ) ) return;

navigator.xr.addEventListener( 'sessiongranted', () => {

Expand Down

0 comments on commit 149069f

Please sign in to comment.