Skip to content

Commit 7092756

Browse files
dekinderfietsBethGriggs
authored andcommitted
lib: change http client path assignment
- change http client path assignment from to (it's more appropriate in this case). - since the inner condition is the only referencing the variable, moved the assignment to the inner condition. PR-URL: #35508 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Ricky Zhou <[email protected]>
1 parent 1610728 commit 7092756

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎lib/_http_client.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ function ClientRequest(input, options, cb){
145145
if(this.agent&&this.agent.protocol)
146146
expectedProtocol=this.agent.protocol;
147147

148-
letpath;
149148
if(options.path){
150-
path=String(options.path);
149+
constpath=String(options.path);
151150
if(INVALID_PATH_REGEX.test(path))
152151
thrownewERR_UNESCAPED_CHARACTERS('Request path');
153152
}

0 commit comments

Comments
(0)