From 86739e7d1e72478c59bdaa029ba62e1c9fd1143f Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 15 Dec 2016 13:15:00 +0000 Subject: [PATCH] Simplify handling of only one member event --- src/components/views/elements/MemberEventListSummary.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/views/elements/MemberEventListSummary.js b/src/components/views/elements/MemberEventListSummary.js index 50fd93f01c..7811044fda 100644 --- a/src/components/views/elements/MemberEventListSummary.js +++ b/src/components/views/elements/MemberEventListSummary.js @@ -182,9 +182,8 @@ module.exports = React.createClass({ } if (!userEvents[userId].first) { userEvents[userId].first = e; - } else { - userEvents[userId].last = e; } + userEvents[userId].last = e; }); // Populate the join/leave event arrays with events that represent what happened @@ -198,10 +197,6 @@ module.exports = React.createClass({ (userId) => { let firstEvent = userEvents[userId].first; let lastEvent = userEvents[userId].last; - // Only one membership event was recorded for this userId - if (!lastEvent) { - lastEvent = firstEvent; - } // Membership BEFORE eventsToRender let previousMembership = firstEvent.getPrevContent().membership || "leave";