You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS version: Mac OS Monterey 12.3.1 (It doesn't matter...)
Description:
Actual behavior
Setter of request.query saves single element instead of the array.
Setter of request.query uses qs.stringify to save the input to request.querystring, and it would be converted into the form like key=value1&key=value2.
But when array size is 1, it becomes unable to know whether it's array or string since it would be saved as key=value1.
So preprocessing would be necessary I think.
Expected behavior
An array should be saved as I passed.
Code to reproduce
ctx.query={tagIdList: ['abcd']};console.log(ctx.query);// It prints out { tagIdList: 'abcd' }
The text was updated successfully, but these errors were encountered:
However, I'm tentatively holding any approvals as I judge this to require a semver major bump, in which case Koa could benefit from other changes as well.
Describe the bug
Node.js version: 16.10.0
OS version: Mac OS Monterey 12.3.1 (It doesn't matter...)
Description:
Actual behavior
Setter of
request.query
saves single element instead of the array.Setter of
request.query
usesqs.stringify
to save the input torequest.querystring
, and it would be converted into the form likekey=value1&key=value2
.But when array size is 1, it becomes unable to know whether it's array or string since it would be saved as
key=value1
.So preprocessing would be necessary I think.
Expected behavior
An array should be saved as I passed.
Code to reproduce
The text was updated successfully, but these errors were encountered: