mirror of
https://github.com/sbrl/powahroot.git
synced 2024-11-21 22:22:59 +00:00
RequestContext.querystring: Fix embarrassing bug
This commit is contained in:
parent
54bacf340f
commit
8abe43ddfa
2 changed files with 6 additions and 3 deletions
|
@ -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`
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue