Skip to content

Spicemix master #2813 #2920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/compat/performance/performance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const IS_STABLE_START_MARK = '_isStableStart';
const IS_STABLE_END_MARK = '_isStableEnd';

function markStarts() {
if (typeof(window) !== 'undefined' && window.performance) {
if (typeof(window) !== 'undefined' && window.performance && window.performance.mark) {
window.performance.mark(IS_STABLE_START_MARK);
return true;
} else {
Expand All @@ -22,7 +22,7 @@ export class PerformanceMonitoringService implements OnDestroy {
private disposable: Subscription|undefined;

constructor(appRef: ApplicationRef) {
if (started) {
if (started && window.performance.mark) {
this.disposable = appRef.isStable.pipe(
first(it => it),
tap(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/compat/performance/performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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