on master help sign in
Fix a naming error
d0a2421Evan Czaplicki
installers/npm/download.js+2−2
@@ -76,11 +76,11 @@ function requestWithRedirects(url, maxRedirects, failure, success)
76
76
77 var redirectUrl = new URL(response.headers['location'], new URL(url).origin).href;
77 var redirectUrl = new URL(response.headers['location'], new URL(url).origin).href;
78
78
79− if (typeof redirectPath === 'string' && response.statusCode >= 300 && response.statusCode < 400)
79+ if (typeof redirectUrl === 'string' && response.statusCode >= 300 && response.statusCode < 400)
80 {
80 {
81 return (maxRedirects <= 0)
81 return (maxRedirects <= 0)
82 ? failure(new Error('followed 10 redirects and gave up'))
82 ? failure(new Error('followed 10 redirects and gave up'))
83− : requestWithRedirects(redirectPath, maxRedirects - 1, failure, success);
83+ : requestWithRedirects(redirectUrl, maxRedirects - 1, failure, success);
84 }
84 }
85 else
85 else
86 {
86 {