diff --git a/src/js/assayJS.js b/src/js/assayJS.js index 87783dbc9c3e3a29484c4070061052980d88c805..55009b84c12a559aa870626678232398b59f30eb 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -448,11 +448,11 @@ globalThis.pronounsForSlaveProp = function(slave, prop) { }; /** Get the written title for a given slave, without messing with global state. - * @param {App.Entity.SlaveState} slave + * @param {App.Entity.SlaveState} [slave] * @returns {string} */ globalThis.getWrittenTitle = function(slave) { - if (slave.custom.title !== undefined && slave.custom.title !== "" && slave.rudeTitle === 0) { + if (slave && slave.custom.title !== undefined && slave.custom.title !== "" && slave.rudeTitle === 0) { return slave.custom.title; } if (V.PC.customTitle !== undefined) { diff --git a/src/uncategorized/hgSelect.tw b/src/uncategorized/hgSelect.tw index 948219fd110cba414ed7a4647c3cdd1c1febf7b3..f5e42a51b8d47bbfa077a031562f017e08eced72 100644 --- a/src/uncategorized/hgSelect.tw +++ b/src/uncategorized/hgSelect.tw @@ -59,7 +59,7 @@ _HGName is <br> _HGName <<if ($HGFormality != 0)>> - will be ''formal'': $he will always call you <<= WrittenMaster()>>, just like any other slave. [[Allow private informality|HG Select][$HGFormality = 0]] + will be ''formal'': $he will always call you <<= getWrittenTitle(_S.HeadGirl)>>, just like any other slave. [[Allow private informality|HG Select][$HGFormality = 0]] <<else>> is allowed to be ''informal'': in private, $he may call you <<= properTitle()>>. [[Maintain complete formality|HG Select][$HGFormality = 1]] <</if>>