-
Notifications
You must be signed in to change notification settings - Fork 33
Prop validation fix #241
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
Prop validation fix #241
Conversation
…application - Updated the component removal logic to ensure that a component is only removed if it exists on the parent. - Added error handling when applying properties to instances to log any issues encountered during the process.
- Modified the focus method call to include a boolean parameter for better control over camera behavior during animations.
🦋 Changeset detectedLatest commit: e6a820a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue with prop validation for components that have only getters without setters. The fix includes error handling for property assignment failures and adjusts the logic for determining which properties should be included in pseudo-public props.
- Adds try-catch error handling around property assignment to prevent crashes when setting read-only properties
- Updates prop filtering logic to include properties with getters but exclude setter-only properties
- Adds a safety check to prevent unnecessary component removal operations
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/lib/src/utils/validation.ts | Adds error handling for property assignment and fixes prop filtering logic for getter/setter properties |
| packages/lib/src/hooks/use-component.tsx | Adds safety check to prevent component removal when component doesn't exist |
| .changeset/thirty-yaks-occur.md | Documents the prop validation improvement as a patch release |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Fixes an issue with prop validation where members only have a setter.