Skip to content

Commit 2cf6a5b

Browse files
authored
Safely check for XRWebGLBinding (#30319)
1 parent 47cbf9d commit 2cf6a5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderers/webxr/WebXRManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class WebXRManager extends EventDispatcher {
277277

278278
// Check that the browser implements the necessary APIs to use an
279279
// XRProjectionLayer rather than an XRWebGLLayer
280-
const useLayers = XRWebGLBinding !== undefined && 'createProjectionLayer' in XRWebGLBinding.prototype;
280+
const useLayers = typeof XRWebGLBinding !== 'undefined' && 'createProjectionLayer' in XRWebGLBinding.prototype;
281281

282282
if ( ! useLayers ) {
283283

0 commit comments

Comments
 (0)