Skip to content

Commit

Permalink
Not show social media links if they are falsy
Browse files Browse the repository at this point in the history
Updates condition to now show social media links when the value is an empty string. Earlier it would check only for null which would treat empty strings as truthy
  • Loading branch information
HelNershingThapa committed Jul 27, 2022
1 parent 413309b commit 3d7998c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/userDetail/headerProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const SocialMedia = ({ data }) => {
</li>
)}
{socialMediaItems.map((i) => {
if (data[i] === null) {
if (!data[i]) {
return null;
}

Expand Down

0 comments on commit 3d7998c

Please sign in to comment.