From ca12e9230c523c364312bb1b9144d2c29d8ca278 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 30 Nov 2020 11:43:59 -0500
Subject: [PATCH] piercing description work

---
 .../bodyModification/bodyModification.js           | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js
index 7bf74146472..abf07c9f304 100644
--- a/src/facilities/bodyModification/bodyModification.js
+++ b/src/facilities/bodyModification/bodyModification.js
@@ -191,17 +191,17 @@ App.UI.bodyModification = function(slave, cheat = false) {
 		const el = new DocumentFragment();
 		let r = [];
 		const piercingLocations = ["ear", "nose", "eyebrow", "lips", "tongue", "nipples", "areolae", "navel", "corset", "clit", "vagina", "dick", "anus"];
-		const _piercingCount = piercingLocations.reduce((acc, cur) => acc += Number(slave[`${cur}Piercing`] > 0), 0);
 		/* DESCRIPTIONS */
 		App.UI.DOM.appendNewElement("h2", el, "Piercings");
 
-		if (_piercingCount === 0) {
-			App.UI.DOM.appendNewElement("div", el, `${His} smooth ${slave.skin} skin is completely unpierced.`);
-		} else {
-			for (const piercing of piercingLocations.concat(["chastity"])) {
-				App.UI.DOM.appendNewElement("div", el, App.Desc.piercing(slave, piercing));
-			}
+		for (const piercing of piercingLocations.concat(["chastity"])) {
+			r.push(App.UI.DOM.makeElement("div", App.Desc.piercing(slave, piercing)));
+		}
+		if (r.length === 0) {
+			r.push(App.UI.DOM.makeElement("div", `${His} smooth ${slave.skin} skin is completely unpierced.`));
 		}
+		App.Events.addNode(el, r);
+		r = [];
 
 		/* Apply piercings */
 		r.push(`Choose piercing style:`);
-- 
GitLab