fix: timeline not showing when set to public (#37937)

This commit is contained in:
Tom
2019-12-20 07:49:02 -06:00
committed by mrugesh
parent 2e3a5d4b1f
commit f5360e9393

View File

@ -796,7 +796,17 @@ export default function(User) {
...user, ...user,
about: showAbout ? about : '', about: showAbout ? about : '',
calendar: showHeatMap ? calendar : {}, calendar: showHeatMap ? calendar : {},
completedChallenges: showCerts && showTimeLine ? completedChallenges : [], completedChallenges: (function() {
if (showTimeLine) {
return showCerts
? completedChallenges
: completedChallenges.filter(
({ challengeType }) => challengeType !== 7
);
} else {
return [];
}
})(),
isDonating: showDonation ? isDonating : null, isDonating: showDonation ? isDonating : null,
location: showLocation ? location : '', location: showLocation ? location : '',
name: showName ? name : '', name: showName ? name : '',