Comparing version 2.0.0 to 2.0.1
# CHANGELOG - PageXray | ||
version 2.0.1 2017-12-19 | ||
------------------------ | ||
### Fixed | ||
* Chrome strips everything after # in the URL in the HAR, Firefox keeps it. Handle both [#49](https://github.com/sitespeedio/pagexray/issues/49). | ||
version 2.0.0 2017-11-10 | ||
@@ -4,0 +9,0 @@ ------------------------ |
@@ -105,6 +105,17 @@ 'use strict'; | ||
getEntryByURL(entries, url, pageId) { | ||
return entries.find( | ||
// Chrome and Chrome-HAR strips everything after # | ||
// Firefox keeps it | ||
const myEntry = entries.find( | ||
entry => entry.request.url === url && entry.pageref === pageId | ||
); | ||
// Try without # | ||
if (!myEntry) { | ||
const withoutHash = url.split('#')[0]; | ||
return entries.find( | ||
entry => entry.request.url === withoutHash && entry.pageref === pageId | ||
); | ||
} else { | ||
return myEntry; | ||
} | ||
} | ||
}; |
{ | ||
"name": "pagexray", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Xray your HAR file and know all about the page", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"engines": { | ||
"node": ">=8.7.0" | ||
"node": ">=8.9.0" | ||
}, | ||
@@ -49,0 +49,0 @@ "devDependencies": { |
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
33047
640