Skip to content

Commit

Permalink
[minor] this shouldnt be in var block
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrugzz committed Nov 11, 2014
1 parent 7c5e40a commit 3f19e6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/http-proxy/common.js
Expand Up @@ -140,8 +140,9 @@ common.urlJoin = function() {
lastIndex = args.length - 1,
last = args[lastIndex],
lastSegs = last.split('?'),
args[lastIndex] = lastSegs[0],
retSegs;

args[lastIndex] = lastSegs[0];

//
// Join all strings, but remove empty strings so we don't get extra slashes from
Expand Down

2 comments on commit 3f19e6e

@richardkazuomiller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like someone didn't test their code before pushing! Haha sorry, don't mean to be critical. I just noticed because my last pull was at the commit before this. This is why I don't like using commas for multiple variable definitions. It can lead to stuff like that, and if you forget a comma the code still runs and you end up creating unwanted GLOBAL variables.

@indexzero
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't want to bikeshed on this. We use one var statement per scope in this module. The typo fixed before the version was pushed out, you shouldn't be running against master if you can help it. Thank you again for your contribution!

Please sign in to comment.