diff --git a/src/elements/a-gltf-entity.js b/src/elements/a-gltf-entity.js index 66dbc69dced146742422b5969a917b110bf8f615..33489e2bc1792aa2b9dd4bddca360caaa39c509b 100644 --- a/src/elements/a-gltf-entity.js +++ b/src/elements/a-gltf-entity.js @@ -238,7 +238,10 @@ AFRAME.registerElement("a-gltf-entity", { // If the src attribute is a selector, get the url from the asset item. if (src && src.charAt(0) === "#") { const assetEl = document.getElementById(src.substring(1)); - if (!assetEl) { return; } + if (!assetEl) { + console.warn(`Attempted to use non-existent asset ${src} as src for`, this); + return; + } const fallbackSrc = assetEl.getAttribute("src"); const highSrc = assetEl.getAttribute("high-src");