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
commit c45930de0428c461c4bb96e769e8b8f1b19b46be Author: Marat Gubaidullin <[email protected]> AuthorDate: Mon Nov 25 16:57:41 2024 -0500 PollDefinition component properties --- karavan-core/src/core/api/CamelUtil.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/karavan-core/src/core/api/CamelUtil.ts b/karavan-core/src/core/api/CamelUtil.ts index 35525f22..f9def80c 100644 --- a/karavan-core/src/core/api/CamelUtil.ts +++ b/karavan-core/src/core/api/CamelUtil.ts @@ -197,12 +197,8 @@ export class CamelUtil { if (name) { const component = ComponentApi.findByName(name); - return component - ? ComponentApi.getComponentProperties( - component?.component.name, - element.dslName === 'FromDefinition' ? 'consumer' : 'producer', - ) - : []; + const type: 'consumer' | 'producer' = ['FromDefinition', 'PollDefinition'].includes(element.dslName) ? 'consumer' : 'producer' + return component ? ComponentApi.getComponentProperties(component?.component.name, type) : []; } else { return []; }
