Skip to content

Commit e9159ac

Browse files
committed
TS: Fix skewed arrays due to recursive call
1 parent 6d55d1f commit e9159ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

javascript/extractor/lib/typescript/src/type_table.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,10 @@ export class TypeTable {
974974
if (superType == null) continue;
975975
let baseTypeSymbol = superType.symbol;
976976
if (baseTypeSymbol == null) continue;
977+
let baseId = this.getSymbolId(baseTypeSymbol);
978+
// Note: take care not to perform a recursive call between the two `push` calls.
977979
this.baseTypes.symbols.push(symbolId);
978-
this.baseTypes.baseTypeSymbols.push(this.getSymbolId(baseTypeSymbol));
980+
this.baseTypes.baseTypeSymbols.push(baseId);
979981
}
980982
}
981983
}

0 commit comments

Comments
 (0)