diff --git a/src/components/gltf-model-plus.js b/src/components/gltf-model-plus.js index 062d403b1c6438ee454ab616edf796e9b1f7f983..61445a2bd6185ac8ca621a2e1a1351ccb207302f 100644 --- a/src/components/gltf-model-plus.js +++ b/src/components/gltf-model-plus.js @@ -230,7 +230,7 @@ AFRAME.registerComponent("gltf-model-plus", { }, loadTemplates() { - this.templates = []; + this.templates = {}; this.el.querySelectorAll(":scope > template").forEach(templateEl => { const root = document.importNode(templateEl.firstElementChild || templateEl.content.firstElementChild, true); this.templates[templateEl.getAttribute("data-name")] = root;