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(proxy): ignore nulls in transformJsonResponse #719

Merged
merged 3 commits into from
Jun 8, 2022

Conversation

Birkbjo
Copy link
Member

@Birkbjo Birkbjo commented Jun 8, 2022

A bug caused objects that had property: null to be converted to {}. This was causing the data-entry-app to crash, and was a pretty obscure bug to track down. The root of the issue is that typeof null === 'object', and when using _transform with a default of {}, all null-properties were transformed to {}.

@Birkbjo Birkbjo requested review from amcgee and ismay June 8, 2022 14:59
@amcgee
Copy link
Member

amcgee commented Jun 8, 2022

Good catch, nice investigation @Birkbjo !

@Birkbjo Birkbjo force-pushed the fix/proxy-dont-transform-nulls branch from 314ca66 to f52d5d8 Compare June 8, 2022 15:26
@Birkbjo Birkbjo merged commit b72dd79 into master Jun 8, 2022
@Birkbjo Birkbjo deleted the fix/proxy-dont-transform-nulls branch June 8, 2022 17:43
dhis2-bot added a commit that referenced this pull request Jun 8, 2022
## [9.0.1](v9.0.0...v9.0.1) (2022-06-08)

### Bug Fixes

* **proxy:** ignore nulls in transformJsonResponse ([#719](#719)) ([b72dd79](b72dd79))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 9.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

5 participants