Skip to content

Commit

Permalink
fix(component): replace animationFrameScheduler with requestAnimation…
Browse files Browse the repository at this point in the history
…Frame (#3592)

Closes #3591
  • Loading branch information
markostanimirovic authored Sep 30, 2022
1 parent da401c3 commit 0a4d2dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/component/src/core/tick-scheduler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ApplicationRef, inject, Injectable, NgZone } from '@angular/core';
import { animationFrameScheduler } from 'rxjs';
import { isNgZone } from './zone-helpers';

@Injectable({
Expand Down Expand Up @@ -28,7 +27,7 @@ export class AnimationFrameTickScheduler extends TickScheduler {
schedule(): void {
if (!this.isScheduled) {
this.isScheduled = true;
animationFrameScheduler.schedule(() => {
requestAnimationFrame(() => {
this.appRef.tick();
this.isScheduled = false;
});
Expand Down

0 comments on commit 0a4d2dd

Please sign in to comment.