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: ensure LinksInput handles array values correctly #534

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

sktbrd
Copy link
Collaborator

@sktbrd sktbrd commented Dec 18, 2024

This pull request includes several updates to the LinksInput component in src/common/components/molecules/LinksInput.tsx to improve its functionality and ensure the value prop is handled correctly. The most important changes include initializing the visibleFields state properly, adding checks to ensure value is an array, and enhancing the readability of the code with comments.

Improvements to state initialization and handling:

  • Properly initialize the visibleFields state to handle cases where value is not an array.

Enhancements to event handlers:

  • Added checks in handleLinkChange and removeLink to ensure value is an array before proceeding with updates. [1] [2]

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nounspace-ts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:09am

@j-paterson j-paterson merged commit 2408cbc into canary Dec 20, 2024
3 checks passed
@j-paterson j-paterson deleted the link-fidget-fix branch December 20, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants