diff --git a/src/descriptions/officeDescription.js b/src/descriptions/officeDescription.js index 6a80928d872366443a7ddfb003eb0b752e43bc00..0ee1681cab847f527b01f48c21a9f0913f9d737e 100644 --- a/src/descriptions/officeDescription.js +++ b/src/descriptions/officeDescription.js @@ -583,11 +583,12 @@ App.Desc.officeDescription = function(lastElement) { } napkinMap.get(slave.napkinShape).push(slave); } - // Use toSentence to stitch the types of napkins together, after it has already been used to stich the slaves together + // Make a fragment for each napkin type that we have, including the slaves that made that type const napkinTypes = []; - for (const [shape, array] of napkinMap) { - napkinTypes.push(App.UI.DOM.combineNodes(`${shape} given to you by `, slaveSentence(array))); + for (const [shape, slaves] of napkinMap) { + napkinTypes.push(App.UI.DOM.combineNodes(`${shape} given to you by `, slaveSentence(slaves))); } + // Use toSentence to stitch each napkin type's sentence fragment to the next r.push(App.UI.DOM.toSentence(napkinTypes)); App.Events.addNode(el, r); }