From 51ffabb5fb83aa48035384448795bd167fe45893 Mon Sep 17 00:00:00 2001
From: netpro2k <netpro2k@gmail.com>
Date: Tue, 17 Jul 2018 15:50:30 -0700
Subject: [PATCH] Fix for inflating gltf models with no actual components

---
 src/components/gltf-model-plus.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/components/gltf-model-plus.js b/src/components/gltf-model-plus.js
index 825fd0713..b7f48bb57 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
-- 
GitLab