diff --git a/gitnexus/src/core/ingestion/workers/parse-worker.ts b/gitnexus/src/core/ingestion/workers/parse-worker.ts index f982788ae..c123a9d90 100644 --- a/gitnexus/src/core/ingestion/workers/parse-worker.ts +++ b/gitnexus/src/core/ingestion/workers/parse-worker.ts @@ -1706,7 +1706,7 @@ const processFileGroup = ( captureMap['call']!, { filePath: file.path, language }, ); - if (heritageItems && heritageItems.length > 0) { + if (heritageItems !== null) { for (const item of heritageItems) { result.heritage.push({ filePath: file.path, diff --git a/gitnexus/test/unit/heritage-extraction.test.ts b/gitnexus/test/unit/heritage-extraction.test.ts index 77ed930a1..787971f07 100644 --- a/gitnexus/test/unit/heritage-extraction.test.ts +++ b/gitnexus/test/unit/heritage-extraction.test.ts @@ -40,7 +40,7 @@ interface MockNode { } /** Create a minimal mock SyntaxNode for capture map entries. */ -function makeNode(text: string, type = 'identifier', parent?: MockNode | null): MockNode { +function makeNode(text: string, type = 'identifier', parent?: MockNode): MockNode { return { type, text, parent: parent ?? null }; }