Copilot commented on code in PR #18057:
URL: 
https://github.com/apache/dolphinscheduler/pull/18057#discussion_r2918515470


##########
dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-cell-active.ts:
##########
@@ -69,14 +67,9 @@ export function useCellActive(options: Options) {
     edge.setAttrs(edgeProps.attrs)
     edge.setLabels([
       {
-        ..._.merge(
-          {
-            attrs: _.cloneDeep(edgeProps.defaultLabel.attrs)
-          }
-          // {
-          //   attrs: { label: { text: labelName } }
-          // }
-        )
+        ..._.merge({
+          attrs: _.cloneDeep(edgeProps.defaultLabel.attrs)
+        })

Review Comment:
   Using `_.merge` with a single argument is redundant and slightly misleading 
here (it has nothing to merge into/from). Consider replacing this with a plain 
object literal (or, if merging is intended, pass an explicit target and source 
objects) to make intent clearer and avoid unnecessary lodash work.
   ```suggestion
           attrs: _.cloneDeep(edgeProps.defaultLabel.attrs)
   ```



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