twenty
twenty copied to clipboard
Fix Raw Json Null Error
Closes #12932
What this PR does
Fixes an error that occurred when null was passed to persistField for RAW_JSON fields.
Changes made
- Removed unsafe
persistField(null)call. - Updated
persistJsonFieldto safely parse JSON and skip invalid values.
Testing
- Manually tested clicking outside with empty and valid JSON.
- No error thrown, field saves only when JSON is valid.
Related
No related issue, minor internal improvement.
🚀 Preview Environment Ready!
Your preview environment is available at: http://bore.pub:2027
This environment will automatically shut down when the PR is closed or after 5 hours.
Thanks for your contribution, @rajatsingh23! I made a minor update to prevent persisting fields where specific logic has already been written for JSON fields.
@Devessier I'll make sure to handle such cases in the core logic in future PRs