Skip to content
Permalink
Browse files

[minor] this shouldnt be in var block

  • Loading branch information...
jcrugzz committed Nov 11, 2014
1 parent 7c5e40a commit 3f19e6e178e168a16beee74186691f3e0e54d517
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/http-proxy/common.js
@@ -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

2 comments on commit 3f19e6e

@richardkazuomiller

This comment has been minimized.

Copy link
Contributor

richardkazuomiller replied Nov 12, 2014

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

This comment has been minimized.

Copy link
Member

indexzero replied Nov 12, 2014

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.
You can’t perform that action at this time.