Skip to content

Conversation

@asvishnyakov
Copy link

@asvishnyakov asvishnyakov commented Jun 25, 2020

#1197 fix

Currently if value is null or undefined (checked as value ? doSomething(value) : <any>undefined), it will set undefined to object if value is null, that's incorrect. If we pass null as value, it should still be null value. That's two different values, including API: for example, ASP.NET core will produce 415 error if you will send empty body (undefined) instead of null value.

The easiest way to fix it without making multiple checks for null and undefined is to just pass data value back if it's null or undefined: value ? doSomething(value) : value

@asvishnyakov
Copy link
Author

@RicoSuter please review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant