diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index f2fabb90c..2706f0c1e 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -159,9 +159,11 @@ export class CodebaseIndexer { const indexes: CodebaseIndex[] = []; // not parallelizing to avoid race conditions in sqlite for (const indexType of indexTypesToBuild) { - const index = await indexTypeToIndexerMapping[indexType](); - if (index) { - indexes.push(index); + if (indexType && indexType in indexTypeToIndexerMapping) { + const index = await indexTypeToIndexerMapping[indexType](); + if (index) { + indexes.push(index); + } } }