mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
TS: Fix skewed arrays due to recursive call
This commit is contained in:
@@ -974,8 +974,10 @@ export class TypeTable {
|
||||
if (superType == null) continue;
|
||||
let baseTypeSymbol = superType.symbol;
|
||||
if (baseTypeSymbol == null) continue;
|
||||
let baseId = this.getSymbolId(baseTypeSymbol);
|
||||
// Note: take care not to perform a recursive call between the two `push` calls.
|
||||
this.baseTypes.symbols.push(symbolId);
|
||||
this.baseTypes.baseTypeSymbols.push(this.getSymbolId(baseTypeSymbol));
|
||||
this.baseTypes.baseTypeSymbols.push(baseId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user