diff --git a/webapp/channels/src/utils/performance_telemetry/reporter.ts b/webapp/channels/src/utils/performance_telemetry/reporter.ts index e3aaaa4bd9..64f566c9b9 100644 --- a/webapp/channels/src/utils/performance_telemetry/reporter.ts +++ b/webapp/channels/src/utils/performance_telemetry/reporter.ts @@ -196,7 +196,16 @@ export default class PerformanceReporter { } private handleMeasure(entry: PerformanceMeasure) { - if (!entry.detail?.report) { + let report; + try { + report = Boolean(entry.detail?.report); + } catch { + // Measures recorded by browser extensions may be in a separate context which causes accessing + // entry.detail to throw an error + report = false; + } + + if (!report) { return; } @@ -209,7 +218,16 @@ export default class PerformanceReporter { } private handleMark(entry: PerformanceMeasure) { - if (!entry.detail?.report) { + let report; + try { + report = Boolean(entry.detail?.report); + } catch { + // Measures recorded by browser extensions may be in a separate context which causes accessing + // entry.detail to throw an error + report = false; + } + + if (!report) { return; }