diff --git a/src/components/issue.jsx b/src/components/issue.jsx index fea7b7c..6873bd6 100644 --- a/src/components/issue.jsx +++ b/src/components/issue.jsx @@ -95,6 +95,9 @@ let Issue = React.createClass({ render() { const {card, primaryRepoName, columnRegExp} = this.props; const {issue, repoOwner, repoName} = card; + if (!issue) { + return (Maybe moving Issue...); + } // TODO: Maybe the following 2 should be methods on the card const {taskFinishedCount, taskTotalCount} = getTaskCounts(issue.body); const issueDueAt = getIssueDueAt(issue.body); @@ -105,9 +108,8 @@ let Issue = React.createClass({ // PR updatedAt is updated when commits are pushed const updatedAt = card.getUpdatedAt(); - if (!issue) { - return (Maybe moving Issue...); - } + const {comments: commentsCount} = issue; // count of comments + const user = issue.assignee ? issue.assignee : issue.user; const assignedAvatar = ( @@ -245,6 +247,16 @@ let Issue = React.createClass({ ); }); + let comments; + if (commentsCount) { + comments = ( + + {commentsCount} + + + ); + } + const header = [