Skip to content

Commit

Permalink
fix(optional-policies): hide Policies section in user profile when no…
Browse files Browse the repository at this point in the history
… optional policies exist
  • Loading branch information
rafaucau committed Nov 14, 2024
1 parent f7cc50b commit b5abfc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/src/forum/components/addManagePoliciesOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ 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) {
return;
}

let policyState = app.session.user.fofTermsPoliciesState();

Expand Down

0 comments on commit b5abfc1

Please sign in to comment.