diff --git a/src/operators/groupBy.ts b/src/operators/groupBy.ts index bdc287dd45..0cfbea43b6 100644 --- a/src/operators/groupBy.ts +++ b/src/operators/groupBy.ts @@ -116,7 +116,7 @@ class GroupBySubscriber extends Subscriber { } removeGroup(key: string) { - this.groups[key] = null; + this.groups.delete(key); } } diff --git a/src/util/FastMap.ts b/src/util/FastMap.ts index 448944fd2b..8fbeb31cdd 100644 --- a/src/util/FastMap.ts +++ b/src/util/FastMap.ts @@ -19,7 +19,7 @@ export default class FastMap { forEach(cb, thisArg) { const values = this._values; for (let key in values) { - if (values.hasOwnProperty(key)) { + if (values.hasOwnProperty(key) && values[key] !== null) { cb.call(thisArg, values[key], key); } }