fix: ensure proper type handling for JSON parsing in loadBacklogPlan function

Updated the JSON parsing in the loadBacklogPlan function to explicitly cast the raw input as a string, improving type safety and preventing potential runtime errors when handling backlog plan data.
This commit is contained in:
Kacper
2026-01-16 20:09:01 +01:00
parent 9819d2e91c
commit dbb84aba23

View File

@@ -77,7 +77,7 @@ export async function loadBacklogPlan(projectPath: string): Promise<StoredBacklo
try {
const filePath = getBacklogPlanPath(projectPath);
const raw = await secureFs.readFile(filePath, 'utf-8');
const parsed = JSON.parse(raw) as StoredBacklogPlan;
const parsed = JSON.parse(raw as string) as StoredBacklogPlan;
if (!parsed?.result?.changes) {
return null;
}