Skip to content

Commit

Permalink
VRButton: test navigator for SSR (mrdoob#26915)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Oct 9, 2023
1 parent aae8223 commit 5ef9a2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/jsm/webxr/VRButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class VRButton {

static registerSessionGrantedListener() {

if ( 'xr' in navigator ) {
if ( typeof navigator !== 'undefined' && 'xr' in navigator ) {

// WebXRViewer (based on Firefox) has a bug where addEventListener
// throws a silent exception and aborts execution entirely.
Expand Down

0 comments on commit 5ef9a2b

Please sign in to comment.