Skip to content

Commit 3d33583

Browse files
committed
fix: add null guard for result.get(relPath) in typeMap backfill (#558)
The ! non-null assertion was dropped during TS migration. Added an explicit guard with continue to skip safely when the entry is missing, preventing silent TypeError on the subsequent property access.
1 parent 5d965c9 commit 3d33583

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/domain/parser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ export async function parseFilesAuto(
568568
extracted = wasmExtractSymbols(parsers, filePath, code);
569569
if (extracted?.symbols?.typeMap) {
570570
const symbols = result.get(relPath);
571+
if (!symbols) continue;
571572
symbols.typeMap =
572573
extracted.symbols.typeMap instanceof Map
573574
? extracted.symbols.typeMap

0 commit comments

Comments
 (0)