From d88bff113a15cf35aab4cb8bcf36664e18c2903b Mon Sep 17 00:00:00 2001 From: Nikhil Garg Date: Sat, 27 Feb 2021 19:50:12 -0800 Subject: [PATCH] Make the badge selector also show the default selected badges --- src/components/UserProperty/Badges.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UserProperty/Badges.js b/src/components/UserProperty/Badges.js index d71afa8..955e2ac 100644 --- a/src/components/UserProperty/Badges.js +++ b/src/components/UserProperty/Badges.js @@ -31,7 +31,7 @@ const Badges = ({ user, onChange }) => { return [...previousBadges.filter((b) => b.displayed == false), ...newDisplayedBadges] || [] } }, user.badges || []); - const displayedBadges = badges.filter((b) => b.displayed == true).sort((a, b) => a.order - b.order) || [] + const displayedBadges = user.displayedBadges || []; const badgesAlphabetical = [...badges].sort((a, b) => a.id.localeCompare(b.id)) return (