diff --git a/src/components/gltf-model-plus.js b/src/components/gltf-model-plus.js index 825fd0713a7540923da2628128bba29ea294de77..b7f48bb579b96baccc8d89b30c68017ff76687b3 100644 --- a/src/components/gltf-model-plus.js +++ b/src/components/gltf-model-plus.js @@ -265,8 +265,7 @@ AFRAME.registerComponent("gltf-model-plus", { this.model.animations = model.animations; this.el.setObject3D("mesh", this.model); - if (this.data.inflate) { - this.inflatedEl = inflateEntities(this.model, this.templates, gltfPath); + if (this.data.inflate && (this.inflatedEl = inflateEntities(this.model, this.templates, gltfPath))) { this.el.appendChild(this.inflatedEl); this.el.setObject3D("mesh", this.inflatedEl.object3D); // TODO: Still don't fully understand the lifecycle here and how it differs between browsers, we should dig in more