Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Check for window.performance.mark
For compatibility with test environments that replace window.performance
  • Loading branch information
spicemix authored May 4, 2021
commit 68609880aff704c114ae1ae79a817196bb7922cc
2 changes: 1 addition & 1 deletion src/performance/performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class AngularFirePerformance {
}

const trace$ = (traceId: string) => {
if (typeof window !== 'undefined' && window.performance) {
if (typeof window !== 'undefined' && window.performance && window.performance.mark) {
const entries = window.performance.getEntriesByName(traceId, 'measure') || [];
const startMarkName = `_${traceId}Start[${entries.length}]`;
const endMarkName = `_${traceId}End[${entries.length}]`;
Expand Down