From ee6e2d346bfba775f3ab204d8d475af0f451218e Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sun, 26 Feb 2023 17:50:40 -0500
Subject: [PATCH] Correctly delay evaluation of the text for the policy
 Guaranteeing the Right to Bear Arms.

---
 js/003-data/policiesData.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/js/003-data/policiesData.js b/js/003-data/policiesData.js
index 7836c303c49..648a8e83d92 100644
--- a/js/003-data/policiesData.js
+++ b/js/003-data/policiesData.js
@@ -2060,10 +2060,13 @@ App.Data.Policies.Selection = {
 			{
 				title: "Guarantee the Right to Bear Arms",
 				titleClass: "lime",
-				text: `it is an expected right under the ideals established by Antebellum Revivalism that eligible citizens ought to be able to possess weaponry and form militias to defend themselves and their property. 
-					${V.secExpEnabled && V.SecExp.edicts.weaponsLaw === 0 ? 
-						` By your edict, citizens are currently forbidden from possessing firearms. Enacting this law will automatically set the range of weapons allowed within the arcology to non-automatic, non-high caliber, free of the usual cost of authority.` : ``
-					}`,
+				get text() {
+					let text = `it is an expected right under the ideals established by Antebellum Revivalism that eligible citizens ought to be able to possess weaponry and form militias to defend themselves and their property.`;
+					if (V.secExpEnabled && V.SecExp.edicts.weaponsLaw === 0) {
+						text += ` By your edict, citizens are currently forbidden from possessing firearms. Enacting this law will automatically set the range of weapons allowed within the arcology to non-automatic, non-high caliber, free of the usual cost of authority.`;
+					}
+					return text;
+				},
 				activatedText: "citizens proudly carry arms in defense of themselves and the arcology against foreign threats and the slave class.",
 				get requirements() { return (V.arcologies[0].FSAntebellumRevivalist >= 90); },
 				onImplementation: function() {
-- 
GitLab