Skip to content

Commit

Permalink
fix(cdk): unsubscribe from pan service when directive is destroyed (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Sep 18, 2024
1 parent ce15783 commit 5ce088a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/cdk/directives/pan/pan.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class TuiPanService extends Observable<readonly [number, number]> {
const el = tuiInjectElement();
const doc = inject(DOCUMENT);

super((subscriber) => {
super((subscriber) =>
merge(
tuiTypedFromEvent(el, 'touchstart', {passive: true}),
tuiTypedFromEvent(el, 'mousedown'),
Expand Down Expand Up @@ -51,7 +51,7 @@ export class TuiPanService extends Observable<readonly [number, number]> {
),
repeat(),
)
.subscribe(subscriber);
});
.subscribe(subscriber),
);
}
}

0 comments on commit 5ce088a

Please sign in to comment.