From 7a6090614e226e2d2839f251a451f559bb2358fc Mon Sep 17 00:00:00 2001 From: Andreas Awouters Date: Tue, 7 Feb 2023 16:01:15 +0100 Subject: [PATCH] make XRWebGLLayer spec compliant --- src/api/XRWebGLLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/XRWebGLLayer.js b/src/api/XRWebGLLayer.js index dbeedd8..88b76d4 100644 --- a/src/api/XRWebGLLayer.js +++ b/src/api/XRWebGLLayer.js @@ -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`); } }