Skip to content

Commit

Permalink
add safe operator for blank badges user profiles (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
TahaMaqbool authored Dec 2, 2022
1 parent a4914f0 commit 70c78fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selectors/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const selectUserTruncatedShortBio = createSelector(

export const selectUserBadges = createSelector(
[selectUser], user => Immutable.List(user.get('badges')
.reduce((uniques, badge) => uniques.concat(uniques.includes(badge) ? [] : [badge]), [])),
?.reduce((uniques, badge) => uniques.concat(uniques.includes(badge) ? [] : [badge]), [])),
)

export const selectUserProfileBadges = createSelector(
Expand Down

0 comments on commit 70c78fd

Please sign in to comment.