File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const IS_STABLE_START_MARK = '_isStableStart';
66const IS_STABLE_END_MARK = '_isStableEnd' ;
77
88function markStarts ( ) {
9- if ( typeof ( window ) !== 'undefined' && window . performance ) {
9+ if ( typeof ( window ) !== 'undefined' && window . performance && window . performance . mark ) {
1010 window . performance . mark ( IS_STABLE_START_MARK ) ;
1111 return true ;
1212 } else {
@@ -22,7 +22,7 @@ export class PerformanceMonitoringService implements OnDestroy {
2222 private disposable : Subscription | undefined ;
2323
2424 constructor ( appRef : ApplicationRef ) {
25- if ( started ) {
25+ if ( started && window . performance . mark ) {
2626 this . disposable = appRef . isStable . pipe (
2727 first ( it => it ) ,
2828 tap ( ( ) => {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export class AngularFirePerformance {
5252}
5353
5454const trace$ = ( traceId : string ) => {
55- if ( typeof window !== 'undefined' && window . performance ) {
55+ if ( typeof window !== 'undefined' && window . performance && window . performance . mark ) {
5656 const entries = window . performance . getEntriesByName ( traceId , 'measure' ) || [ ] ;
5757 const startMarkName = `_${ traceId } Start[${ entries . length } ]` ;
5858 const endMarkName = `_${ traceId } End[${ entries . length } ]` ;
You can’t perform that action at this time.
0 commit comments