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 and MarconLP committed Sep 6, 2024
1 parent 64e3d7a commit 2dd5b66
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 2dd5b66

Please sign in to comment.