Skip to content

Commit

Permalink
Don't set null/undefined outputContext in the shim
Browse files Browse the repository at this point in the history
If outputContext is set, it must be a valid XRPresentationContext.
Setting it to null or undefined is not legal.
  • Loading branch information
klausw authored and toji committed Jan 25, 2019
1 parent 25e968c commit 87d78f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/webxr-version-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@ class WebXRVersionShim {

XR.prototype.requestSession = function(options) {
return shim._ensureDefaultDevice().then((device) => {
let newOptions = {
outputContext: options.outputContext
};
let newOptions = {};
if (options.outputContext) {
newOptions.outputContext = options.outputContext;
}

if (options.mode == 'immersive-vr') {
newOptions.immersive = true;
Expand Down

0 comments on commit 87d78f2

Please sign in to comment.