Skip to content

Commit

Permalink
refactor(optional-policies): rename policies variable to `optionalP…
Browse files Browse the repository at this point in the history
…olicies` for better clarity
  • Loading branch information
rafaucau committed Nov 14, 2024
1 parent b5abfc1 commit ef2aa39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/src/forum/components/addManagePoliciesOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ async function updatePolicy(policy, value) {

export default function () {
extend(SettingsPage.prototype, 'settingsItems', function (items) {
const policies = app.store.all('fof-terms-policies').filter((policy) => policy.optional());
if (!policies.length) {
const optionalPolicies = app.store.all('fof-terms-policies').filter((policy) => policy.optional());
if (!optionalPolicies.length) {
return;
}

Expand All @@ -26,7 +26,7 @@ export default function () {
items.add(
'policies',
<FieldSet label={'Policies'}>
{policies.map((policy) => {
{optionalPolicies.map((policy) => {
const { is_accepted } = policyState[policy.id()];
return (
<div class={'Fof-Terms-Policy-User-Settings-Management'}>
Expand Down

0 comments on commit ef2aa39

Please sign in to comment.