Bug 1467451 - Convert lodash .pick() to native ES6 (#3644)

This commit is contained in:
Rajesh Kathiriya 2018-07-14 03:17:55 +05:30 коммит произвёл Cameron Dawson
Родитель d101789232
Коммит 4ccadb29f4
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -464,10 +464,9 @@ treeherderApp.controller('MainCtrl', [
};
const getNewReloadTriggerParams = function () {
return _.pick(
$location.search(),
ThResultSetStore.reloadOnChangeParameters,
);
const locationSearch = $location.search();
return ThResultSetStore.reloadOnChangeParameters.reduce(
(acc, prop) => (locationSearch[prop] ? { ...acc, [prop]: locationSearch[prop] } : acc), {});
};
$scope.toggleFieldFilterVisible = function () {

Просмотреть файл

@ -66,7 +66,9 @@ treeherder.factory('ThResultSetStore', [
// these params will be passed in each time we poll to remain
// within the constraints of the URL params
var rsPollingParams = _.pick($location.search(), rsPollingKeys);
const locationSearch = $location.search();
var rsPollingParams = rsPollingKeys.reduce(
(acc, prop) => (locationSearch[prop] ? { ...acc, [prop]: locationSearch[prop] } : acc), {});
// Register push poller if it's not registered
var pushPoller = $interval(function () {