File tree 2 files changed +3
-3
lines changed
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';
6
6
const IS_STABLE_END_MARK = '_isStableEnd' ;
7
7
8
8
function markStarts ( ) {
9
- if ( typeof ( window ) !== 'undefined' && window . performance ) {
9
+ if ( typeof ( window ) !== 'undefined' && window . performance && window . performance . mark ) {
10
10
window . performance . mark ( IS_STABLE_START_MARK ) ;
11
11
return true ;
12
12
} else {
@@ -22,7 +22,7 @@ export class PerformanceMonitoringService implements OnDestroy {
22
22
private disposable : Subscription | undefined ;
23
23
24
24
constructor ( appRef : ApplicationRef ) {
25
- if ( started ) {
25
+ if ( started && window . performance . mark ) {
26
26
this . disposable = appRef . isStable . pipe (
27
27
first ( it => it ) ,
28
28
tap ( ( ) => {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export class AngularFirePerformance {
52
52
}
53
53
54
54
const trace$ = ( traceId : string ) => {
55
- if ( typeof window !== 'undefined' && window . performance ) {
55
+ if ( typeof window !== 'undefined' && window . performance && window . performance . mark ) {
56
56
const entries = window . performance . getEntriesByName ( traceId , 'measure' ) || [ ] ;
57
57
const startMarkName = `_${ traceId } Start[${ entries . length } ]` ;
58
58
const endMarkName = `_${ traceId } End[${ entries . length } ]` ;
You can’t perform that action at this time.
0 commit comments