From 1bcd5b5ec7952bf51d9cf6df17f2e8416212226d Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 22 Jun 2020 21:35:15 -0400
Subject: [PATCH] fixes

---
 src/interaction/policies/policies.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/interaction/policies/policies.js b/src/interaction/policies/policies.js
index 00c862863c4..272da2ad3c2 100644
--- a/src/interaction/policies/policies.js
+++ b/src/interaction/policies/policies.js
@@ -122,12 +122,11 @@ globalThis.policy = function(category) {
 		let div;
 		let span;
 		let link;
-		let policyValue = _.get(V.policies, selectedPolicy[0].policy);
+		const policyValue = _.get(V.policies, selectedPolicy[0].policy);
 		if (policyValue === 0) {
 			// apply
 			for (let i = 0; i < selectedPolicy.length; i++) {
 				const p = selectedPolicy[i];
-				policyValue = _.get(V.policies, p.policy);
 
 				testArray(p);
 				div = document.createElement("div");
@@ -178,7 +177,7 @@ globalThis.policy = function(category) {
 				i = policyValue - 1;
 			}
 			const p = selectedPolicy[i];
-			policyValue = _.get(V.policies, p.policy);
+
 			testArray(p);
 			div = document.createElement("div");
 			span = document.createElement("span");
@@ -190,7 +189,7 @@ globalThis.policy = function(category) {
 			div.append(`: `);
 
 			// Description text
-			if (p.hasOwnProperty("activatedText")) {
+			if (p.hasOwnProperty("activatedText")) {  // Some policies have different text if a policy is activated: "you will use" vs "you are using".
 				div.append(p.activatedText);
 			} else {
 				div.append(p.text);
-- 
GitLab