mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: resolve TypeScript error in backlog plan loading
Fix type mismatch in loadBacklogPlan where secureFs.readFile with 'utf-8' encoding returns union type string | Buffer, causing JSON.parse to fail type checking. Cast raw to string to satisfy TypeScript strict mode. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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