Skip to content

Commit

Permalink
Merge pull request #16464 from davelopez/23.0_fix_user_preferences_di…
Browse files Browse the repository at this point in the history
…sabled_condition

[23.0] Fix filtering of disabled user preferences in UI
  • Loading branch information
mvdbeek authored Jul 26, 2023
2 parents a12ca8f + 65c2037 commit 47b99ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/components/User/UserPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ export default {
},
computed: {
activePreferences() {
const enabledPreferences = Object.entries(getUserPreferencesModel()).filter((f) => !f.disabled);
const userPreferencesEntries = Object.entries(getUserPreferencesModel());
// Object.entries returns an array of arrays, where the first element
// is the key (string) and the second is the value (object)
const enabledPreferences = userPreferencesEntries.filter((f) => !f[1].disabled);
return Object.fromEntries(enabledPreferences);
},
hasLogout() {
Expand Down

0 comments on commit 47b99ae

Please sign in to comment.