Skip to content

Commit

Permalink
refactor(groupBy): clear groups via map.clear interface
Browse files Browse the repository at this point in the history
closes #1257
  • Loading branch information
kwonoj committed Feb 10, 2016
1 parent e3fbd05 commit ace3932
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/operator/groupBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ class GroupBySubscriber<T, K, R> extends Subscriber<T> implements RefCountSubscr
if (groups) {
groups.forEach((group, key) => {
group.error(err);
this.removeGroup(key);
});

groups.clear();
}
this.destination.error(err);
}
Expand All @@ -143,8 +144,9 @@ class GroupBySubscriber<T, K, R> extends Subscriber<T> implements RefCountSubscr
if (groups) {
groups.forEach((group, key) => {
group.complete();
this.removeGroup(key);
});

groups.clear();
}
this.destination.complete();
}
Expand Down

0 comments on commit ace3932

Please sign in to comment.