Skip to content

Commit

Permalink
fix(cdk): unsubscribe from zoom 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 88a8f5b commit 36ee705
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/cdk/directives/zoom/zoom.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class TuiZoomService extends Observable<TuiZoomEvent> {
const el = tuiInjectElement();
const {wheelSensitivity} = inject(TUI_ZOOM_OPTIONS);

super((subscriber) => {
super((subscriber) =>
merge(
tuiTypedFromEvent(el, 'touchstart', {passive: true}).pipe(
filter(({touches}) => touches.length > 1),
Expand Down Expand Up @@ -64,7 +64,7 @@ export class TuiZoomService extends Observable<TuiZoomEvent> {
event: wheel,
})),
),
).subscribe(subscriber);
});
).subscribe(subscriber),
);
}
}

0 comments on commit 36ee705

Please sign in to comment.