Skip to content
Snippets Groups Projects
Commit a130cdaf authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'fix-missing-empty' into 'pregmod-master'

finally fix no results message

See merge request !8515
parents 261de38d 48cd604b
No related branches found
No related tags found
1 merge request!8515finally fix no results message
...@@ -185,8 +185,9 @@ App.UI.SlaveInteract.wardrobe = function(slave) { ...@@ -185,8 +185,9 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
// Sort // Sort
array = array.sort((a, b) => (a.text > b.text) ? 1 : -1); array = array.sort((a, b) => (a.text > b.text) ? 1 : -1);
if (array.length > 0) { const list = generateRows(array, "clothes", true);
App.UI.DOM.appendNewElement("div", el, generateRows(array, "clothes", true), "choices"); if ($(list)[0].children.length > 0) {
App.UI.DOM.appendNewElement("div", el, list, "choices");
} else { } else {
App.UI.DOM.appendNewElement("div", el, "No available clothing meets your criteria", ["note", "choices"]); App.UI.DOM.appendNewElement("div", el, "No available clothing meets your criteria", ["note", "choices"]);
} }
...@@ -214,8 +215,9 @@ App.UI.SlaveInteract.wardrobe = function(slave) { ...@@ -214,8 +215,9 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
// Sort // Sort
array = array.sort((a, b) => (a.text > b.text) ? 1 : -1); array = array.sort((a, b) => (a.text > b.text) ? 1 : -1);
if (array.length > 0) { const list = generateRows(array, "collar", true);
App.UI.DOM.appendNewElement("div", el, generateRows(array, "collar", true), "choices"); if ($(list)[0].children.length > 0) {
App.UI.DOM.appendNewElement("div", el, list, "choices");
} else { } else {
App.UI.DOM.appendNewElement("div", el, "No available collar meets your criteria", ["note", "choices"]); App.UI.DOM.appendNewElement("div", el, "No available collar meets your criteria", ["note", "choices"]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment