diff --git a/src/interaction/policies/policies.js b/src/interaction/policies/policies.js index 00c862863c41dfbdf8b9f138386c6a1c18abf0b3..272da2ad3c24f2ee8642d3ad225d87344952ad89 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);