From 69d1b10508cc76ac5f693782b244bfdc88e1823d Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Thu, 10 Mar 2016 18:32:22 -0500 Subject: [PATCH] fix(sidebar): don't show nulled profiles --- .../participant-profile/lib/clearbit-data-source.coffee | 6 +++--- .../participant-profile/lib/sidebar-participant-profile.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal_packages/participant-profile/lib/clearbit-data-source.coffee b/internal_packages/participant-profile/lib/clearbit-data-source.coffee index f9fcef194..075056dde 100644 --- a/internal_packages/participant-profile/lib/clearbit-data-source.coffee +++ b/internal_packages/participant-profile/lib/clearbit-data-source.coffee @@ -45,15 +45,15 @@ module.exports = class ClearbitDataSource _socialProfiles: (person={}) -> profiles = {} - if person.twitter + if (person.twitter?.handle ? "").length > 0 profiles.twitter = handle: person.twitter.handle url: "https://twitter.com/#{person.twitter.handle}" - if person.facebook + if (person.facebook?.handle ? "").length > 0 profiles.facebook = handle: person.facebook.handle url: "https://facebook.com/#{person.facebook.handle}" - if person.linkedin + if (person.linkedin?.handle ? "").length > 0 profiles.linkedin = handle: person.linkedin.handle url: "https://linkedin.com/#{person.linkedin.handle}" diff --git a/internal_packages/participant-profile/lib/sidebar-participant-profile.jsx b/internal_packages/participant-profile/lib/sidebar-participant-profile.jsx index 87ea80204..8eda0616a 100644 --- a/internal_packages/participant-profile/lib/sidebar-participant-profile.jsx +++ b/internal_packages/participant-profile/lib/sidebar-participant-profile.jsx @@ -95,7 +95,7 @@ export default class SidebarParticipantProfile extends React.Component { const profiles = _.map(this.state.socialProfiles, (profile, type) => { const linkFn = () => {shell.openExternal(profile.url)} return ( - +