Skip to content

Conversation

@bhelx
Copy link
Contributor

@bhelx bhelx commented Oct 1, 2024

In the json encoder / decoder, we were essentially re-writing undefineds with null. This should preserve the value as null or undefined in the falsey case.

> x = undefined
> 
> x == null ? x : x.toString()
> 
> x = null
> null
> x == null ? x : x.toString()
> null
> x = 123
> 123
> x == null ? x : x.toString()
> '123'

bhelx added 2 commits October 1, 2024 15:43
In the json encoder / decoder, we were essentially re-writing undefineds
with null. This should preserve the value as null or undefined in the
falsey case.
@bhelx bhelx requested a review from chrisdickinson October 1, 2024 20:56
@bhelx bhelx force-pushed the preserve-undefined branch from 201bfae to cde2e6f Compare October 1, 2024 21:14
Copy link
Contributor

@chrisdickinson chrisdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bhelx bhelx merged commit c9de0eb into main Oct 1, 2024
3 checks passed
@bhelx bhelx deleted the preserve-undefined branch October 1, 2024 21:25
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.

2 participants