-
Notifications
You must be signed in to change notification settings - Fork 438
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: protect against falsy selectedGroup
#7593
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Oct 4, 2024 7:40 PM (UTC) ✅ All Tests Passed -- expand for details
|
⚡️ Editor Performance ReportUpdated Fri, 04 Oct 2024 19:55:06 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
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.
It would be nice to have a test for this case, but the change looks good 👍
### Description This fixes a bug that caused the document editor to crash in certain cases where there is no selected group. This occurs when the default field group is not found. Allow this value to be `undefined` and checking for it fixes the issue. ### What to review Does this correct protect against all cases where the selectedGroup is undefined? Are all the types updated correctly? ### Testing This was tested manually in the admin studio. I built sanity package, packed it, and install it in the admin studio and the issue was resolved. ### Notes for release Fixes a bug that caused the document editor to crash when the default field group is not found.
Description
This fixes a bug that caused the document editor to crash in certain cases where there is no selected group. This occurs when the default field group is not found. Allow this value to be
undefined
and checking for it fixes the issue.What to review
Does this correct protect against all cases where the selectedGroup is undefined? Are all the types updated correctly?
Testing
This was tested manually in the admin studio. I built sanity package, packed it, and install it in the admin studio and the issue was resolved.
Notes for release
Fixes a bug that caused the document editor to crash when the default field group is not found.