shamrickus commented on code in PR #7420:
URL: https://github.com/apache/trafficcontrol/pull/7420#discussion_r1152494318


##########
traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js:
##########
@@ -132,6 +132,20 @@ var FormDeliveryServiceController = 
function(deliveryService, dsCurrent, origin,
        };
        $scope.arrayCompare = arrayCompare;
 
+       /**
+        * This function is called when capability is updated on a DSR
+        */
+       function capabilityChange() {
+               cap = []

Review Comment:
   `cap` is storing a _reference_ to the array instead of the actual array. So 
making it `const` works even though we are changing the _value_ because it only 
restricts changing the _reference_.
   
   In other words, `const` means the value of the `cap` can be changed, but we 
cannot reassign it to a _different_ array.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to