querystring: fix stringify for empty array
Fixes #33910 (closed)
Currently
querystring.stringify({a:1, b:[]})
return "a=1&"
and
querystring.stringify({a:1})
return "a=1"
and
querystring.stringify({a:[], b:[]})
return ""
If this PR is merged, first one will change to
querystring.stringify({a:1, b:[]})
return "a=1"
.
I think that this is better for consistency.
Checklist
-
tests and/or benchmarks are included -
commit message follows commit guidelines