Skip to content

Commit 7c5e40a

Browse files
committed
[fix] style changes
1 parent eb95660 commit 7c5e40a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

lib/http-proxy/common.js

+12-8
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,21 @@ common.getPort = function(req) {
133133
*/
134134

135135
common.urlJoin = function() {
136-
var args = Array.prototype.slice.call(arguments);
137-
138-
// We do not want to mess with the query string. All we want to touch is the path.
139-
var lastIndex = args.length-1;
140-
var last = args[lastIndex]
141-
var lastSegs = last.split('?')
142-
args[lastIndex] = lastSegs[0]
136+
//
137+
// We do not want to mess with the query string. All we want to touch is the path.
138+
//
139+
var args = Array.prototype.slice.call(arguments),
140+
lastIndex = args.length - 1,
141+
last = args[lastIndex],
142+
lastSegs = last.split('?'),
143+
args[lastIndex] = lastSegs[0],
144+
retSegs;
143145

146+
//
144147
// Join all strings, but remove empty strings so we don't get extra slashes from
145148
// joining e.g. ['', 'am']
146-
var retSegs = [
149+
//
150+
retSegs = [
147151
args.filter(function filter(a) {
148152
return !!a;
149153
}).join('/').replace(/\/+/g, '/')

0 commit comments

Comments
 (0)