There was an error while loading. Please reload this page.
1 parent df63e7f commit 637bb48Copy full SHA for 637bb48
src/core/scene/a-scene.js
@@ -248,6 +248,10 @@ module.exports.AScene = registerElement('a-scene', {
248
if (this.is('vr-mode')) { return Promise.resolve('Already in VR.'); }
249
// Enter VR via WebVR API.
250
if (!fromExternal && (this.checkHeadsetConnected() || this.isMobile)) {
251
+ if (!this.camera) {
252
+ // Attempted to enter VR before the camera was initialized. Aborting silently.
253
+ return Promise.resolve();
254
+ }
255
vrDisplay = utils.device.getVRDisplay();
256
vrManager.setDevice(vrDisplay);
257
vrManager.enabled = true;
0 commit comments