diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index 6cccc2fa78b5132a69ca736edbc739b0c3682d55..46640b44817b17325e4d2184aae2c4ec7f92e21e 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -185,8 +185,9 @@ App.UI.SlaveInteract.wardrobe = function(slave) { // Sort array = array.sort((a, b) => (a.text > b.text) ? 1 : -1); - if (array.length > 0) { - App.UI.DOM.appendNewElement("div", el, generateRows(array, "clothes", true), "choices"); + const list = generateRows(array, "clothes", true); + if ($(list)[0].children.length > 0) { + App.UI.DOM.appendNewElement("div", el, list, "choices"); } else { App.UI.DOM.appendNewElement("div", el, "No available clothing meets your criteria", ["note", "choices"]); } @@ -214,8 +215,9 @@ App.UI.SlaveInteract.wardrobe = function(slave) { // Sort array = array.sort((a, b) => (a.text > b.text) ? 1 : -1); - if (array.length > 0) { - App.UI.DOM.appendNewElement("div", el, generateRows(array, "collar", true), "choices"); + const list = generateRows(array, "collar", true); + if ($(list)[0].children.length > 0) { + App.UI.DOM.appendNewElement("div", el, list, "choices"); } else { App.UI.DOM.appendNewElement("div", el, "No available collar meets your criteria", ["note", "choices"]); }