diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 22ccf04dc7bb1081389daedd9a15a3b1c1497a44..4487b6e657202246e27b762cf44b62aee27d6e7c 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -1438,30 +1438,18 @@ window.FacilityDatatypeCleanup = (function() { } function FacilityDecorationCleanup() { - if (typeof V.brothelDecoration !== "string") - V.brothelDecoration = "standard"; - if (typeof V.dairyDecoration !== "string") - V.dairyDecoration = "standard"; - if (typeof V.clubDecoration !== "string") - V.clubDecoration = "standard"; - if (typeof V.servantsQuartersDecoration !== "string") - V.servantsQuartersDecoration = "standard"; - if (typeof V.schoolroomDecoration !== "string") - V.schoolroomDecoration = "standard"; - if (typeof V.spaDecoration !== "string") - V.spaDecoration = "standard"; - if (typeof V.clinicDecoration !== "string") - V.clinicDecoration = "standard"; - if (typeof V.arcadeDecoration !== "string") - V.arcadeDecoration = "standard"; - if (typeof V.cellblockDecoration !== "string") - V.cellblockDecoration = "standard"; - if (typeof V.masterSuiteDecoration !== "string") - V.masterSuiteDecoration = "standard"; - if (typeof V.nurseryDecoration !== "string") - V.nurseryDecoration = "standard"; - if (typeof V.farmyardDecoration !== "string") - V.farmyardDecoration = "standard"; + ValidateFacilityDecoration("brothelDecoration"); + ValidateFacilityDecoration("dairyDecoration"); + ValidateFacilityDecoration("clubDecoration"); + ValidateFacilityDecoration("servantsQuartersDecoration"); + ValidateFacilityDecoration("schoolroomDecoration"); + ValidateFacilityDecoration("spaDecoration"); + ValidateFacilityDecoration("clinicDecoration"); + ValidateFacilityDecoration("arcadeDecoration"); + ValidateFacilityDecoration("cellblockDecoration"); + ValidateFacilityDecoration("masterSuiteDecoration"); + ValidateFacilityDecoration("nurseryDecoration"); + ValidateFacilityDecoration("farmyardDecoration"); } function FacilityNameCleanup() { diff --git a/src/js/utilJS.js b/src/js/utilJS.js index aae2cc6e5d1d4c2abe26c36fdde6311149df4387..02de1105f7e6c93e7073765fded9f61bed5227ad 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1077,6 +1077,8 @@ window.ValidateFacilityDecoration = function ValidateFacilityDecoration(decorati V[decoration] = "standard"; } break; + default: + V[decoration] = "standard"; } };