Fix block label update source parameter keys issue (#1135)
This commit is contained in:
@@ -744,7 +744,7 @@ function getUpdatedNodesAfterLabelUpdateForParameterKeys(
|
|||||||
}
|
}
|
||||||
const oldLabel = labelUpdatedNode.data.label as string;
|
const oldLabel = labelUpdatedNode.data.label as string;
|
||||||
return nodes.map((node) => {
|
return nodes.map((node) => {
|
||||||
if (node.type === "nodeAdder") {
|
if (node.type === "nodeAdder" || node.type === "start") {
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
if (node.type === "task") {
|
if (node.type === "task") {
|
||||||
@@ -798,13 +798,13 @@ function getUpdatedParametersAfterLabelUpdateForSourceParameterKey(
|
|||||||
const oldOutputParameterKey = getOutputParameterKey(oldLabel);
|
const oldOutputParameterKey = getOutputParameterKey(oldLabel);
|
||||||
const newOutputParameterKey = getOutputParameterKey(newLabel);
|
const newOutputParameterKey = getOutputParameterKey(newLabel);
|
||||||
return parameters.map((parameter) => {
|
return parameters.map((parameter) => {
|
||||||
if (parameter.parameterType === "context") {
|
if (
|
||||||
|
parameter.parameterType === "context" &&
|
||||||
|
parameter.sourceParameterKey === oldOutputParameterKey
|
||||||
|
) {
|
||||||
return {
|
return {
|
||||||
...parameter,
|
...parameter,
|
||||||
sourceParameterKey:
|
sourceParameterKey: newOutputParameterKey,
|
||||||
parameter.sourceParameterKey === oldOutputParameterKey
|
|
||||||
? newOutputParameterKey
|
|
||||||
: oldOutputParameterKey,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return parameter;
|
return parameter;
|
||||||
|
|||||||
Reference in New Issue
Block a user