fix(FN-993): add safe-navigation for task.description in recoverCompletedTasks
- Add optional chaining (?.) on task.description.slice() to prevent null-reference crash - Fallback to '(untitled)' when both title and description are absent - Add changeset for @fusion/engine patch
This commit is contained in:
@@ -293,7 +293,7 @@ export class SelfHealingManager {
|
||||
|
||||
let recovered = 0;
|
||||
for (const task of stuckCompleted) {
|
||||
log.log(`Recovering completed task ${task.id}: ${task.title || task.description.slice(0, 60)}`);
|
||||
log.log(`Recovering completed task ${task.id}: ${task.title || task.description?.slice(0, 60) || "(untitled)"}`);
|
||||
const success = await recoverFn(task);
|
||||
if (success) recovered++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user