Skip to content

Commit

Permalink
fix(debounceTime): unschedule dangling task on unsubscribe before com…
Browse files Browse the repository at this point in the history
…plete
  • Loading branch information
backbone87 committed Jun 9, 2021
1 parent 4f4ac00 commit e058bdf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/internal/operators/debounceTime.ts
Expand Up @@ -114,6 +114,8 @@ export function debounceTime<T>(dueTime: number, scheduler: SchedulerLike = asyn
undefined,
() => {
// Teardown.
// unschedule dangling task, if any, if we unsubscribe before complete
activeTask?.unsubscribe();
lastValue = activeTask = null;
}
)
Expand Down

0 comments on commit e058bdf

Please sign in to comment.