File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1243,7 +1243,7 @@ function generateProjectionIndexer(projectionFn) {
1243
1243
} ;
1244
1244
}
1245
1245
1246
- function generateDefaultIndexer ( types ) {
1246
+ function generateDefaultIndexer ( types , self ) {
1247
1247
const dynamicBranches = [ ] ;
1248
1248
const bucketIndices = { } ;
1249
1249
@@ -1271,7 +1271,7 @@ function generateDefaultIndexer(types) {
1271
1271
} else {
1272
1272
let bucket = getTypeBucket ( type ) ;
1273
1273
if ( bucketIndices [ bucket ] !== undefined ) {
1274
- throw new Error ( `ambiguous unwrapped union: ${ j ( this ) } ` ) ;
1274
+ throw new Error ( `ambiguous unwrapped union: ${ j ( self ) } ` ) ;
1275
1275
}
1276
1276
bucketIndices [ bucket ] = index ;
1277
1277
}
@@ -1314,7 +1314,7 @@ class UnwrappedUnionType extends UnionType {
1314
1314
}
1315
1315
this . _getIndex = _projectionFn
1316
1316
? generateProjectionIndexer ( _projectionFn )
1317
- : generateDefaultIndexer ( this . types ) ;
1317
+ : generateDefaultIndexer ( this . types , this ) ;
1318
1318
1319
1319
Object . freeze ( this ) ;
1320
1320
}
You can’t perform that action at this time.
0 commit comments