1
0
Fork 0
mirror of https://github.com/sbrl/powahroot.git synced 2024-11-22 06:23:02 +00:00

RequestContext.querystring: Fix embarrassing bug

This commit is contained in:
Starbeamrainbowlabs 2024-06-05 13:28:54 +01:00
parent 54bacf340f
commit 8abe43ddfa
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 6 additions and 3 deletions

View file

@ -15,6 +15,10 @@ npm install --save powahroot
----- -----
## v1.2.9
- Fix embarrassing bug in new `RequestContext.querystring`
## v1.2.8 ## v1.2.8
- Add convenience getter `RequestContext.querystring` - Add convenience getter `RequestContext.querystring`

View file

@ -18,9 +18,8 @@ class RouterContext {
* @return {Object} The parsed query string as an object, or an empty object. * @return {Object} The parsed query string as an object, or an empty object.
*/ */
get querystring() { get querystring() {
const qs = this.url.querystring; if(this.url.query == null) return {};
if(qs.query == null) return {}; return querystring.parse(this.url.query);
return querystring.parse(qs);
} }
constructor(in_request, in_response) { constructor(in_request, in_response) {