diff --git a/js/src/forum/components/addManagePoliciesOption.js b/js/src/forum/components/addManagePoliciesOption.js index ed3b221..348547e 100644 --- a/js/src/forum/components/addManagePoliciesOption.js +++ b/js/src/forum/components/addManagePoliciesOption.js @@ -16,14 +16,17 @@ 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()); + const optionalPolicies = app.store.all('fof-terms-policies').filter((policy) => policy.optional()); + if (!optionalPolicies.length) { + return; + } let policyState = app.session.user.fofTermsPoliciesState(); items.add( 'policies',