converts empty object into a string
Closed this issue · 2 comments
sarahbkim commented
Not sure if this was done intentionally, but I'd expect that if I started with an object, I'd be able to get that returned as an object.
anacronw commented
Interesting..
I just tried $.param({})
and it becomes an empty string
$.param('')
is also an empty string
There's actually no way to tell those 2 apart unfortunately, as information is lost
anacronw commented
For now, I'll document the shortcoming, you may have to find a workaround. I'm happy to accomodate this case if you can think of a way to do it.