Comparing version 2.0.1 to 2.0.2
# CHANGELOG - PageXray | ||
version 2.0.2 2017-12-27 | ||
------------------------ | ||
### Fixed | ||
* Fixed infinite loop for getting redirects URLs [#50](https://github.com/sitespeedio/pagexray/issues/50). | ||
version 2.0.1 2017-12-19 | ||
@@ -4,0 +9,0 @@ ------------------------ |
@@ -89,12 +89,17 @@ 'use strict'; | ||
}, {}); | ||
let nextUrl = redirections[url]; | ||
// Fixes https://github.com/sitespeedio/pagexray/issues/50 | ||
// for now | ||
redirections[url] = undefined; | ||
while (nextUrl) { | ||
chain.push(nextUrl); | ||
nextUrl = redirections[nextUrl]; | ||
// Right now we aren't the best in the world to handle redirects back | ||
// and forth to the same page but it's kind of an edge case with redirects | ||
// like: | ||
// hepp --> hopp --> hepp --> happ --> hepp --> hipp | ||
// https://github.com/sitespeedio/pagexray/issues/50 | ||
redirections[url] = undefined; | ||
} | ||
const finalUrl = chain.length > 0 ? chain[chain.length - 1] : url; | ||
return { | ||
@@ -101,0 +106,0 @@ finalUrl, |
{ | ||
"name": "pagexray", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Xray your HAR file and know all about the page", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33651
649