From 11a90f3b8e7573f068378f155750f3668970c2ff Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Wed, 18 Dec 2019 21:53:29 -0800
Subject: [PATCH] Correct JSDoc for assignmentVisible() return value type, and
 also make the function actually return the documented type.

---
 src/js/assignJS.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/js/assignJS.js b/src/js/assignJS.js
index ea032e85b8a..71178130adf 100644
--- a/src/js/assignJS.js
+++ b/src/js/assignJS.js
@@ -525,7 +525,7 @@ window.removeJob = function removeJob(slave, assignment) {
  * Indicate whether a slave's current assignment is shown in Main
  * Often used as a proxy for "penthouse slave"
  * @param {App.Entity.SlaveState} slave
- * @return {boolean}
+ * @returns {boolean}
  */
 window.assignmentVisible = function assignmentVisible(slave) {
 	switch (slave.assignment) {
@@ -543,7 +543,7 @@ window.assignmentVisible = function assignmentVisible(slave) {
 		case "work as a servant":
 		case "rest in the spa":
 		case "work as a nanny":
-			return 0;
+			return false;
 
 		/* outside leadership jobs */
 		case "be the Attendant":
@@ -557,20 +557,20 @@ window.assignmentVisible = function assignmentVisible(slave) {
 		case "be the Stewardess":
 		case "be the Wardeness":
 		case "be your Concubine":
-			return 0;
+			return false;
 
 		/* agents are not in the arcology at all */
 		case "be your agent":
 		case "live with your agent":
-			return 0;
+			return false;
 
 		/* transition state */
 		case "choose her own job":
-			return 1; // show
+			return true; // show
 	}
 
 	/* all other jobs are shown in penthouse */
-	return 1;
+	return true;
 };
 
 window.resetJobIDArray = function resetJobIDArray() {
-- 
GitLab