Skip to content

Commit

Permalink
make XRWebGLLayer spec compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Awouters authored and toji committed Mar 5, 2024
1 parent fafd43d commit 7a60906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/XRWebGLLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class XRWebGLLayer {
// the compatible XR device bit as well. It'd be
// unusual for this bit to not be polyfilled.
if (context[POLYFILLED_XR_COMPATIBLE]) {
if (context[XR_COMPATIBLE] !== true) {
if (session[SESSION_PRIVATE].immersive && context[XR_COMPATIBLE] !== true) {
throw new Error(`InvalidStateError`);
}
}
Expand Down

0 comments on commit 7a60906

Please sign in to comment.