From f50aa521e5cd839e36f78c9d8b60bc276493b64c Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Mon, 4 Feb 2019 10:17:45 -0500 Subject: [PATCH] brand fix --- slave variables documentation - Pregmod.txt | 5 ++--- src/js/datatypeCleanupJS.js | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt index 25a066eb7b5..a020f3f2c0d 100644 --- a/slave variables documentation - Pregmod.txt +++ b/slave variables documentation - Pregmod.txt @@ -2045,9 +2045,8 @@ nail type brand: -has brand -0 - no -1 - yes +brand description +accepts 0 or string brandLocation: diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 09ab6c1564a..99bb6c3af11 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -343,7 +343,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() { if (typeof slave.eyewear !== "string") { slave.eyewear = "none"; } - slave.brand = Math.clamp(+slave.brand, 0, 1) || 0; + if (typeof slave.brand !== "string") { + slave.brand = 0; + } if (typeof slave.brandLocation !== "string") { slave.brandLocation = 0; } -- GitLab