From 2776e10f80c0763923abab3531e1bdc91aeb466f Mon Sep 17 00:00:00 2001 From: Tyler-A Date: Tue, 10 Sep 2019 18:53:14 -0600 Subject: [PATCH] Change from .childNodes to .children --- js/add_choice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/add_choice.js b/js/add_choice.js index 1418ee4..62e0e8f 100644 --- a/js/add_choice.js +++ b/js/add_choice.js @@ -4,8 +4,8 @@ const add_choice = () => { let choice_div = document.getElementById("choice-template"); let clone = choice_div.content.cloneNode(true); - clone.childNodes[1].childNodes[1].id = `text-in-${index}`; - clone.childNodes[1].childNodes[3].id = `weight-in-${index}`; + clone.children[0].children[0].id = `text-in-${index}`; + clone.children[0].children[1].id = `weight-in-${index}`; // Add to document without resetting the other ones document.getElementById("choices").appendChild(clone);