Skip to content

Commit

Permalink
fix(widgets): replace removed lodash function pluck() by Array.map()
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Mar 20, 2016
1 parent 08f58bd commit 70c2325
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/IssueLabelsTreemap.jsx
Expand Up @@ -14,10 +14,12 @@ class IssueLabelsTreemap extends Component {
}

getApiRequest() {
let { labels, repository } = this.props;
const { labels, repository } = this.props;

const labelNames = labels.map(label => label.name);

return {
id: `github.issueLabelsAggregations.${ _.pluck(labels, 'name').join('.') }`,
id: `github.issueLabelsAggregations.${ labelNames.join('.') }`,
params: { repository, labels }
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/PullRequestsGauge.jsx
Expand Up @@ -36,7 +36,7 @@ class PullRequestsGauge extends Component {
</span>
) : title;

let cappedValue = Math.min(pullRequests.length, _.max(_.pluck(thresholds, 'threshold')));
let cappedValue = Math.min(pullRequests.length, _.max(thresholds.map(threshold => threshold.threshold)));
let message = null;
let normThresholds = thresholds.map(threshold => {
if (cappedValue <= threshold.threshold) {
Expand Down

0 comments on commit 70c2325

Please sign in to comment.