Skip to content

Commit 1691837

Browse files
ElettrotecnicaAntonio Pisano
andauthored
Stop the light probe only if this was set up in the first place (#5429)
* Stop the light probe only if this was set up in the first place * Compact idiom --------- Co-authored-by: Antonio Pisano <apisano@wu.ac.at>
1 parent 298b1c9 commit 1691837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/scene/reflection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports.Component = register('reflection', {
5151
});
5252

5353
this.el.addEventListener('exit-vr', function () {
54-
self.stopLightProbe();
54+
if (self.xrLightProbe) { self.stopLightProbe(); }
5555
});
5656

5757
this.el.object3D.environment = this.cubeRenderTarget.texture;

0 commit comments

Comments
 (0)