Skip to content

Commit

Permalink
πŸ› fix INP support detection (#2405)
Browse files Browse the repository at this point in the history
On Firefox 88, `PerformanceObserver.supportedEntryTypes` includes `'event'`,
but `PerformanceEventTiming` is not implemented.
  • Loading branch information
BenoitZugmeyer authored Sep 1, 2023
1 parent 3986b4c commit 6c5a33b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,9 @@ export function trackViewInteractionCount(viewLoadingType: ViewLoadingType) {
}

export function isInteractionToNextPaintSupported() {
return supportPerformanceTimingEvent('event') && 'interactionId' in PerformanceEventTiming.prototype
return (
supportPerformanceTimingEvent('event') &&
window.PerformanceEventTiming &&
'interactionId' in PerformanceEventTiming.prototype
)
}

0 comments on commit 6c5a33b

Please sign in to comment.