Skip to content

Commit

Permalink
refactor: simplify req.path getter
Browse files Browse the repository at this point in the history
- Removed redundant function name from the req.path getter for improved readability. The function now directly utilizes the concise function expression.
  • Loading branch information
Ayoub-Mabrouk committed Nov 3, 2024
1 parent b31910c commit e2657b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ defineGetter(req, 'subdomains', function subdomains() {
* @public
*/

defineGetter(req, 'path', function path() {
defineGetter(req, 'path', function() {
return parse(this).pathname;
});

Expand Down

0 comments on commit e2657b7

Please sign in to comment.