Copilot commented on code in PR #12552:
URL: https://github.com/apache/cloudstack/pull/12552#discussion_r2744771450
##########
ui/src/components/view/SearchFilter.vue:
##########
@@ -175,6 +175,7 @@ export default {
immediate: true,
handler (newFilters) {
const clonedFilters = newFilters.map(filter => ({ ...filter }))
+ this.searchFilters = clonedFilters.map(f => ({ ...f }))
Review Comment:
This assignment appears redundant as clonedFilters is already a cloned array
from line 177. The extra cloning via map(f => ({ ...f })) could be simplified
to just this.searchFilters = clonedFilters or this.searchFilters =
[...clonedFilters] if a new array reference is needed. This would improve code
clarity and reduce unnecessary object creation.
```suggestion
this.searchFilters = clonedFilters
```
--
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]