diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index 5ded9cc39e2b9b83b74153af824d3f086d6cfc40..eb0c8bc8bad759bcaa9db4bb11456a44c08351ae 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -543,9 +543,9 @@ App.UI.SlaveList.penthousePage = function () { let r = ''; const thisArcology = V.arcologies[0]; - /** @type {App.Entity.SlaveState} */ - const HG = V.HeadGirl; - if (HG) { + if (V.HeadGirl) { + /** @type {App.Entity.SlaveState} */ + const HG = V.HeadGirl; r += `<strong><u>${span(SlaveFullName(HG), "pink")}</u></strong> is serving as your Head Girl`; if (thisArcology.FSEgyptianRevivalistLaw === 1) { r += ' and Consort'; @@ -566,9 +566,9 @@ App.UI.SlaveList.penthousePage = function () { } r += '<br>'; - /** @type {App.Entity.SlaveState} */ - const RC = V.Recruiter; - if (RC) { + if (V.Recruiter) { + /** @type {App.Entity.SlaveState} */ + const RC = V.Recruiter; const p = getPronouns(RC); r += `<strong><u>${span(SlaveFullName(RC), "pink")}</u></strong> is working `; if (V.recruiterTarget !== "other arcologies") { @@ -595,7 +595,7 @@ App.UI.SlaveList.penthousePage = function () { /** @type {App.Entity.SlaveState} */ const BG = V.Bodyguard; if (BG) { - r += `<strong><u>${span(SlaveFullName(RC), "pink")}</u></strong> is serving as your bodyguard. `; + r += `<strong><u>${span(SlaveFullName(BG), "pink")}</u></strong> is serving as your bodyguard. `; r += span(`<strong>${App.UI.passageLink("Manage Bodyguard", "BG Select")}</strong>`, null, "manageBG") + span("[B]", "cyan"); r += App.UI.SlaveList.render([App.Utils.slaveIndexForId(BG.ID)], [],