@internetarchive/analytics-manager
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -77,6 +77,5 @@ export class AnalyticsHelpers { | ||
get domInteractive() { | ||
var _a, _b; | ||
if (!window.performance) | ||
if (!window.performance || !window.performance.getEntriesByType) | ||
return undefined; | ||
const performanceEntries = (_b = (_a = window.performance).getEntriesByType) === null || _b === void 0 ? void 0 : _b.call(_a, 'navigation'); | ||
const performanceEntries = window.performance.getEntriesByType('navigation'); | ||
if (performanceEntries.length === 0) | ||
@@ -83,0 +82,0 @@ return undefined; |
{ | ||
"name": "@internetarchive/analytics-manager", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A manager for Internet Archive analytics.", | ||
@@ -5,0 +5,0 @@ "author": "Internet Archive", |
@@ -133,4 +133,5 @@ /* eslint-disable class-methods-use-this */ | ||
private get domInteractive(): number | undefined { | ||
if (!window.performance) return undefined; | ||
const performanceEntries = window.performance.getEntriesByType?.( | ||
if (!window.performance || !window.performance.getEntriesByType) | ||
return undefined; | ||
const performanceEntries = window.performance.getEntriesByType( | ||
'navigation' | ||
@@ -137,0 +138,0 @@ ) as PerformanceNavigationTiming[]; |
Sorry, the diff of this file is not supported yet
125697