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: Update useState default values in exportModal and flowSettingsModal #5698

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

anovazzi1
Copy link
Contributor

  • Update the default values for the useState hooks in exportModal and flowSettingsModal to handle null values for currentFlow.
  • Use the nullish coalescing operator (??) to set empty strings as default values for name and description.
  • This ensures that the components do not throw errors when currentFlow is null or undefined.

- Update the default values for the useState hooks in exportModal and flowSettingsModal to handle null values for currentFlow.
- Use the nullish coalescing operator (??) to set empty strings as default values for name and description.
- This ensures that the components do not throw errors when currentFlow is null or undefined.

Refs: #5670, #5672
@anovazzi1 anovazzi1 requested review from lucaseduoli and Cristhianzl and removed request for lucaseduoli January 15, 2025 16:56
@github-actions github-actions bot added the bug Something isn't working label Jan 15, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 15, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. javascript Pull requests that update Javascript code labels Jan 15, 2025
Copy link
Collaborator

@lucaseduoli lucaseduoli 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 Jan 15, 2025
@anovazzi1 anovazzi1 added this pull request to the merge queue Jan 15, 2025
Merged via the queue into main with commit 1f63ebe Jan 15, 2025
38 of 46 checks passed
@anovazzi1 anovazzi1 deleted the preventFlowNameCrash branch January 15, 2025 19:55
mieslep pushed a commit to mieslep/langflow that referenced this pull request Jan 15, 2025
…dal (langflow-ai#5698)

* fix: Update useState default values in exportModal and flowSettingsModal

- Update the default values for the useState hooks in exportModal and flowSettingsModal to handle null values for currentFlow.
- Use the nullish coalescing operator (??) to set empty strings as default values for name and description.
- This ensures that the components do not throw errors when currentFlow is null or undefined.

Refs: langflow-ai#5670, langflow-ai#5672

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
viniciossilva3 pushed a commit to viniciossilva3/langflow that referenced this pull request Jan 16, 2025
…dal (langflow-ai#5698)

* fix: Update useState default values in exportModal and flowSettingsModal

- Update the default values for the useState hooks in exportModal and flowSettingsModal to handle null values for currentFlow.
- Use the nullish coalescing operator (??) to set empty strings as default values for name and description.
- This ensures that the components do not throw errors when currentFlow is null or undefined.

Refs: langflow-ai#5670, langflow-ai#5672

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants