ocket8888 commented on a change in pull request #3662: TP: empty / duplicate
consistent hash query params for a ds need to be re…
URL: https://github.com/apache/trafficcontrol/pull/3662#discussion_r291253827
##########
File path: traffic_portal/app/src/common/api/DeliveryServiceRequestService.js
##########
@@ -26,6 +26,9 @@ var DeliveryServiceRequestService = function(Restangular,
$http, $q, locationUti
this.createDeliveryServiceRequest = function(dsRequest) {
var request = $q.defer();
+ // strip out any falsy values or duplicates from
consistentHashQueryParams
+ dsRequest.deliveryService.consistentHashQueryParams =
_.compact(Array.from(new
Set(dsRequest.deliveryService.consistentHashQueryParams)));
Review comment:
uhh, you might be right. I think browserify can't handle "fat arrow
functions". In that case, you could do:
```javascript
Array.from(new Set(test)).filter(function(i){return i;})
```
which is much less pretty, but works just as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services