Kusuma04-dev commented on code in PR #2834:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2834#discussion_r1908647768


##########
packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx:
##########
@@ -895,11 +902,19 @@ export function DecisionTableExpression({
           case DecisionTableColumnType.OutputClause:
             const newOutputs = [...(prev.output ?? [])];
             newOutputs.splice(localIndexInsideGroup, 1);
-
+            const updatedOutputColumns = [
+              ...(newOutputs ?? []).map((outputColumn) => {
+                const outputCopy = { ...outputColumn };
+                if (newOutputs.length == 1) {
+                  outputCopy["@_name"] = undefined;
+                }
+                return outputCopy;
+              }),
+            ];

Review Comment:
   Yeah i have updated and added the comment ,regarding ?? [] - it will be only 
used to perform map operation when newOutputs is null or undefined and it is to 
avoid any runtime errors and it won't impact anything.



-- 
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: commits-unsubscr...@kie.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@kie.apache.org
For additional commands, e-mail: commits-h...@kie.apache.org

Reply via email to