Skip to content

Commit

Permalink
allow overwrite of req.query on subsequent query parser middleware use
Browse files Browse the repository at this point in the history
  • Loading branch information
Mouri P committed Sep 3, 2024
1 parent 2a980ad commit 02a39de
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/middleware/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ module.exports = function query(options) {
}

return function query(req, res, next){
if (!req.query) {
var val = parseUrl(req).query;
req.query = queryparse(val, opts);
}
var val = parseUrl(req).query;
req.query = queryparse(val, opts);

next();
};
Expand Down

0 comments on commit 02a39de

Please sign in to comment.