Skip to content

Commit

Permalink
fix: harden XR init against Renderer shim (#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett authored Jul 26, 2023
1 parent 40febcd commit 3b4014c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fiber/src/core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function createRoot<TCanvas extends Canvas>(canvas: TCanvas): ReconcilerRoot<TCa
}

// Subscribe to WebXR session events
if (gl.xr) xr.connect()
if (typeof gl.xr?.addEventListener === 'function') xr.connect()
state.set({ xr })
}

Expand Down

0 comments on commit 3b4014c

Please sign in to comment.