diff --git a/packages/rum-core/src/domain/rumEventsCollection/view/viewMetrics/trackInteractionToNextPaint.ts b/packages/rum-core/src/domain/rumEventsCollection/view/viewMetrics/trackInteractionToNextPaint.ts index 1898b9c353..4196ba9f99 100644 --- a/packages/rum-core/src/domain/rumEventsCollection/view/viewMetrics/trackInteractionToNextPaint.ts +++ b/packages/rum-core/src/domain/rumEventsCollection/view/viewMetrics/trackInteractionToNextPaint.ts @@ -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 + ) }