Skip to content

Commit

Permalink
enterVR: reject promise if xr.requestSession fails
Browse files Browse the repository at this point in the history
  • Loading branch information
JL-Vidinoti committed Nov 14, 2023
1 parent 4418c48 commit be6944d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class AScene extends AEntity {
function requestFail (error) {
var useAR = xrMode === 'immersive-ar';
var mode = useAR ? 'AR' : 'VR';
throw new Error('Failed to enter ' + mode + ' mode (`requestSession`) ' + error);
reject(new Error('Failed to enter ' + mode + ' mode (`requestSession`)', { cause: error }));
}
);
});
Expand Down

0 comments on commit be6944d

Please sign in to comment.