Skip to content

Commit

Permalink
fix: ignore performance events that have no name (#24761)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Sep 3, 2024
1 parent 6d26bc8 commit acb2587
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ function filterUnwanted(events: PerformanceEvent[]): PerformanceEvent[] {
// the browser can provide network events that we're not interested in,
// like a navigation to "about:blank"
return events.filter((event) => {
return !(event.entry_type === 'navigation' && event.name && event.name.startsWith('about:'))
const hasNoName = !event.name?.trim().length
const isNavigationToAbout = event.entry_type === 'navigation' && !!event.name && event.name.startsWith('about:')
return !(hasNoName || isNavigationToAbout)
})
}

Expand Down

0 comments on commit acb2587

Please sign in to comment.