fix: add null guards on formState.values in getIn calls (TS2345)#1088
fix: add null guards on formState.values in getIn calls (TS2345)#1088
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change adds defensive null-checking to ChangesuseField Defensive Value Access
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
formState.valuesandform.getState().valuesare typed asFormValues | undefinedin final-form's types, butgetInexpectsobject, causing TS2345 errors at build time. Added null guards at all three call sites inuseField.ts.This fix was missing from the v7.0.1 release PR — needs to land on
mainso the tag can be updated before npm publish.Summary by CodeRabbit