Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression contains by default [object Object] #1076

Closed
apupier opened this issue May 13, 2024 · 0 comments · Fixed by #1077
Closed

Expression contains by default [object Object] #1076

apupier opened this issue May 13, 2024 · 0 comments · Fixed by #1077
Assignees
Labels
bug Something isn't working
Milestone

Comments

@apupier
Copy link
Member

apupier commented May 13, 2024

Describe the Bug

Expression contains by default [object Object]

Steps to Reproduce the Bug or Issue

  1. create a camel route
  2. add a setHeader or setBody, or setVariable (or surely any other components with an expression)

Screenshots or Videos

image

image

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: 2.0.0-RC1
@apupier apupier added the bug Something isn't working label May 13, 2024
@lhein lhein added this to the 2.0.0 milestone May 13, 2024
@lordrip lordrip self-assigned this May 13, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue May 13, 2024
When a new expression-aware step is generated, the expression property is created as follows:

```yaml
        setHeader:
          id: setHeader-1234
          expression:
            simple:
              expression: {}
```

Notice the `expression: {}` bit which causes for the expression TextField to render `[object Object]`

The fix is to replace the `{}` with `""`, so we add an empty string.

fix: KaotoIO#1076
lordrip added a commit to lordrip/kaoto that referenced this issue May 13, 2024
When a new expression-aware step is generated, the expression property is created as follows:

```yaml
        setHeader:
          id: setHeader-1234
          expression:
            simple:
              expression: {}
```

Notice the `expression: {}` bit which causes for the expression TextField to render `[object Object]`

The fix is to remove the `expression: {}` section and leave the `simple: {}` one, this way, in the Source Code editor, the user will get feedback that something is still pending to configure.

fix: KaotoIO#1076
lordrip added a commit that referenced this issue May 13, 2024
When a new expression-aware step is generated, the expression property is created as follows:

```yaml
        setHeader:
          id: setHeader-1234
          expression:
            simple:
              expression: {}
```

Notice the `expression: {}` bit which causes for the expression TextField to render `[object Object]`

The fix is to remove the `expression: {}` section and leave the `simple: {}` one, this way, in the Source Code editor, the user will get feedback that something is still pending to configure.

fix: #1076
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants