Skip to content

Commit

Permalink
Merge pull request #413 from lordrip/fix/kamelets-in-from-node
Browse files Browse the repository at this point in the history
fix(canvas): Replace nodes that contains a single steps property don't work
  • Loading branch information
lhein authored Nov 23, 2023
2 parents 3458004 + f8bce9d commit 39ddc2f
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,6 @@ export class CamelRouteVisualEntity implements BaseVisualCamelEntity {
return;
}

/**
* If the current node contains a single property of type list, it means the target has a single
* property to place the new node in, therefore we add the new one at the beginning of the array
*/
if (stepsProperties.length === 1 && stepsProperties[0].type === 'branch') {
const stepsArray = getArrayProperty(this.route, `${options.data.path}.${stepsProperties[0].name}`);
stepsArray.unshift(defaultValue);

return;
}

const pathArray = options.data.path.split('.');
const last = pathArray[pathArray.length - 1];
const penultimate = pathArray[pathArray.length - 2];
Expand Down

0 comments on commit 39ddc2f

Please sign in to comment.