diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index e64fed6e12653c7b8be919e79e6546269afabc94..4bfbf570fc89ba888b76ee26b5e896d2abe445e8 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -185,11 +185,10 @@ App.UI.SlaveInteract.wardrobe = function(slave) { // Sort array = array.sort((a, b) => (a.text > b.text) ? 1 : -1); - const choices = App.UI.DOM.appendNewElement("div", el, "Choose clothing: ", "choices"); if (array.length > 0) { - choices.appendChild(generateRows(array, "clothes", true)); + App.UI.DOM.appendNewElement("div", el, generateRows(array, "clothes", true), "choices"); } else { - App.UI.DOM.appendNewElement("span", choices, "No available clothing meets your criteria", "note"); + App.UI.DOM.appendNewElement("span", el, "No available clothing meets your criteria", ["note", "choices"]); } return el; } @@ -215,11 +214,10 @@ App.UI.SlaveInteract.wardrobe = function(slave) { // Sort array = array.sort((a, b) => (a.text > b.text) ? 1 : -1); - const choices = App.UI.DOM.appendNewElement("div", el, "Choose collar: ", "choices"); if (array.length > 0) { - choices.appendChild(generateRows(array, "collar", true)); + App.UI.DOM.appendNewElement("div", el, generateRows(array, "collar", true), "choices"); } else { - App.UI.DOM.appendNewElement("span", choices, "No available collar meets your criteria", "note"); + App.UI.DOM.appendNewElement("div", el, "No available collar meets your criteria", ["note", "choices"]); } return el; }