You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2022/04/12 14:26:21 UTC

[camel-karavan] branch main updated: Fix #308 check dslName of flow item (#309)

This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new 9752df5  Fix #308 check dslName of flow item (#309)
9752df5 is described below

commit 9752df537a713a1a95c3079cd2204ce2432858f5
Author: cgballance <cg...@gmail.com>
AuthorDate: Tue Apr 12 10:26:16 2022 -0400

    Fix #308 check dslName of flow item (#309)
---
 karavan-designer/src/designer/route/RouteDesigner.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/karavan-designer/src/designer/route/RouteDesigner.tsx b/karavan-designer/src/designer/route/RouteDesigner.tsx
index 941aa85..5147dde 100644
--- a/karavan-designer/src/designer/route/RouteDesigner.tsx
+++ b/karavan-designer/src/designer/route/RouteDesigner.tsx
@@ -184,10 +184,12 @@ export class RouteDesigner extends React.Component<Props, State> {
          if( ce.dslName === 'FromDefinition' ) { // Get the RouteDefinition for this.  Use its uuid.
             var flows = this.state.integration.spec.flows!;
             for( var i = 0 ; i < flows.length; i++ ) {
-                var routeDefinition : RouteDefinition = flows[i] ;
-                if( routeDefinition.from.uuid === id ) {
-                    id = routeDefinition.uuid ;
-                    break;
+                if( flows[i].dslName === 'RouteDefinition' ) {
+                    var routeDefinition : RouteDefinition = flows[i] ;
+                    if( routeDefinition.from.uuid === id ) {
+                        id = routeDefinition.uuid ;
+                        break;
+                    }
                 }
             }
             message = 'Deleting the first element will delete the entire route!' ;