Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
tunetheweb committed Apr 12, 2024
1 parent 2aff58b commit d2fb0ae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/attribution/onTTFB.ts
Expand Up @@ -24,11 +24,7 @@ import {
} from '../types.js';

const attributeTTFB = (metric: TTFBMetric): void => {
// Only attribute if you have a non-zero responseStart value and a
// navigationEntry entry.
// E.g. For cross-origin redirects, Safari has a workerStart time but no
// TTFB time, so do not provide attribution for that.
if (metric.entries.length && metric.entries[0].responseStart) {
if (metric.entries.length) {
const navigationEntry = metric.entries[0];
const activationStart = navigationEntry.activationStart || 0;

Expand Down

0 comments on commit d2fb0ae

Please sign in to comment.