From 10b0d632d7a4fe2c6613b1af3af18311feabf120 Mon Sep 17 00:00:00 2001
From: Greg Fodor <gfodor@gmail.com>
Date: Tue, 6 Mar 2018 13:34:32 -0800
Subject: [PATCH] Remove var and rename

---
 src/elements/a-gltf-entity.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/elements/a-gltf-entity.js b/src/elements/a-gltf-entity.js
index 9e3ed0f61..ee59e3a24 100644
--- a/src/elements/a-gltf-entity.js
+++ b/src/elements/a-gltf-entity.js
@@ -93,17 +93,16 @@ function attachTemplate(templateEl) {
   const targetEls = templateEl.parentNode.querySelectorAll(selector);
   const clone = document.importNode(templateEl.content, true);
   const templateRoot = clone.firstElementChild;
-  const templateRootAttrs = templateRoot.attributes;
 
-  for (const targetEl of targetEls) {
+  for (const el of targetEls) {
     // Merge root element attributes with the target element
-    for (const { name, value } of templateRootAttrs) {
-      targetEl.setAttribute(name, value);
+    for (const { name, value } of templateRoot.attributes) {
+      el.setAttribute(name, value);
     }
 
     // Append all child elements
     for (const child of templateRoot.children) {
-      targetEl.appendChild(document.importNode(child, true));
+      el.appendChild(document.importNode(child, true));
     }
   }
 }
-- 
GitLab