Skip to content

Commit ede20ae

Browse files
ElettrotecnicaAntonio Pisano
andauthored
Make sure the model was loaded before we attempt to remove the mesh (#5499)
Fixes #4139 Co-authored-by: Antonio Pisano <apisano@wu.ac.at>
1 parent c1af3f4 commit ede20ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/obj-model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ module.exports.Component = registerComponent('obj-model', {
3434
},
3535

3636
remove: function () {
37-
if (!this.model) { return; }
3837
this.resetMesh();
3938
},
4039

4140
resetMesh: function () {
41+
if (!this.model) { return; }
4242
this.el.removeObject3D('mesh');
4343
},
4444

0 commit comments

Comments
 (0)