From 39130f46b21a36283ea21f8ee6221c2a401f9ae7 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Mon, 4 Jan 2021 15:48:41 -0800 Subject: [PATCH] Check for clothes existence before querying properties thereof. --- src/endWeek/saSocialEffects.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/endWeek/saSocialEffects.js b/src/endWeek/saSocialEffects.js index 76df7197803..c42351cb826 100644 --- a/src/endWeek/saSocialEffects.js +++ b/src/endWeek/saSocialEffects.js @@ -822,11 +822,10 @@ App.SlaveAssignment.saSocialEffects = function(slave) { `Society <span class="green">approves</span> of ${slave.slaveName}'s collar as an expression of the old ideal of mortification of the flesh, advancing the combination of religious originalism and modern slavery.`)); } const clothes = App.Data.clothes.get(slave.clothes); - - if (clothes.fs && clothes.fs.loves && clothes.fs.loves.has("FSChattelReligionist")) { + if (clothes && clothes.fs && clothes.fs.loves && clothes.fs.loves.has("FSChattelReligionist")) { t.push(new SocialEffect("Chattel Religionist", 1, `Religious clothing`, `Society <span class="green">approves</span> of ${his} religiously themed clothing, strengthening the connection between sexual servitude and faith.`)); - } else if (clothes.fs && clothes.fs.tolerates && clothes.fs.tolerates.has("FSChattelReligionist")) { + } else if (clothes && clothes.fs && clothes.fs.tolerates && clothes.fs.tolerates.has("FSChattelReligionist")) { t.push(new SocialEffect("Chattel Religionist", 0, `Spartan clothing`, `Society accepts ${his} spartan clothing, seeing it as permissible under the new religious mores.`)); } else if (slave.fuckdoll === 0) { -- GitLab