diff --git a/lib/types.js b/lib/types.js index cba76fd2..1e15acfc 100644 --- a/lib/types.js +++ b/lib/types.js @@ -1280,7 +1280,7 @@ function generateDefaultIndexer(types) { } bucketIndices[bucket] = index; } - }, this); + }); return (val) => { let index = bucketIndices[getValueBucket(val)]; if (dynamicBranches.length) { @@ -1319,7 +1319,7 @@ class UnwrappedUnionType extends UnionType { } this._getIndex = _projectionFn ? generateProjectionIndexer(_projectionFn) - : generateDefaultIndexer.bind(this)(this.types); + : generateDefaultIndexer(this.types); Object.freeze(this); }