mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user