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

fix: add optional chaining and improve code robustness #6262

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

Cristhianzl
Copy link
Member

This pull request includes several improvements to the SwitchOutputView component in the src/frontend/src/CustomNodes/GenericNode/components/outputModal/components/switchOutputView/index.tsx file. The changes primarily focus on improving code robustness and readability by adding optional chaining and refactoring some logic.

Key improvements:

  • Added optional chaining to access properties safely, reducing the risk of runtime errors. [1] [2] [3] [4] [5]
  • Refactored the resultMessageMemoized logic to improve readability and maintainability.

…rties in flowPoolNode data object

🔧 (switchOutputView/index.tsx): Fix issue with accessing nested properties in resultMessage object
@Cristhianzl Cristhianzl self-assigned this Feb 11, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. javascript Pull requests that update Javascript code labels Feb 11, 2025
@github-actions github-actions bot added the bug Something isn't working label Feb 11, 2025
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 12, 2025
@Cristhianzl Cristhianzl added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit 7e132b3 Feb 12, 2025
31 of 39 checks passed
@Cristhianzl Cristhianzl deleted the cz/fix-undefined-data-switchoutput branch February 12, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants