Change the treatment of falsy values in _.toQuery and _.fromQuery? #234
Labels
after modules
This should be postponed until after modularization (temporary label, see #220)
question
@yashshah1 pointed out a problem with
_.toQuery
and_.fromQuery
: through stringification, falsy values are being "upgraded" to truthy if you encode them and then decode them again. For example,_.fromQuery(_.toQuery({a: null}))
returns{a: 'null'}
.@yashshah1 proposed the following solution in #229 (comment):
I'm not sure whether this approach would be the right solution, for a couple of reasons:
undefined
,null
and the empty string''
could no longer be distinguished.However, this is something we can discuss. Let's do that here.
The text was updated successfully, but these errors were encountered: