@shopify/performance
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -10,2 +10,10 @@ # Changelog | ||
## [1.1.1] - 2019-03-04 | ||
### Fixed | ||
- Fixed an issue where events starting before the navigation would include the pre-navigation time in `Navigation#totalDurationByEventType` [[#549](https://github.com/Shopify/quilt/pull/549)] | ||
## [1.1.0] - 2019-03-02 | ||
### Added | ||
@@ -12,0 +20,0 @@ |
@@ -40,2 +40,3 @@ "use strict"; | ||
var events = this.eventsByType(type); | ||
var navigationStart = this.start; | ||
if (events.length === 0) { | ||
@@ -46,4 +47,4 @@ return 0; | ||
return ranges.reduce(function (total, _a) { | ||
var duration = _a.duration; | ||
return total + duration; | ||
var start = _a.start, duration = _a.duration; | ||
return total + duration - Math.max(0, navigationStart - start); | ||
}, 0); | ||
@@ -50,0 +51,0 @@ }; |
{ | ||
"name": "@shopify/performance", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Primitives for collecting browser performance metrics.", |
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
42205
878