Skip to content

Commit

Permalink
Bug 1462625 - Fix TypeError when selecting buildbot jobs (#3561)
Browse files Browse the repository at this point in the history
This was changed from `_.findIndex()` to `Array.prototype.findIndex()`
in #3537, however was using the former's `_.matches()` shorthand
style, which isn't supported by the ES6 equivalent.

https://lodash.com/docs#findIndex
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
  • Loading branch information
edmorley committed May 18, 2018
1 parent c106548 commit f8f260c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/plugins/controller.js
Expand Up @@ -232,7 +232,7 @@ treeherder.controller('PluginCtrl', [
title: "Buildername",
value: $scope.job.ref_data_name
});
$scope.buildernameIndex = $scope.job_details.findIndex({ title: "Buildername" });
$scope.buildernameIndex = $scope.job_details.findIndex(({ title }) => title === 'Buildername');
}

// the third result comes from the jobLogUrl promise
Expand Down

0 comments on commit f8f260c

Please sign in to comment.