An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.
JavaScript aicursorcursor-aicursorailovablelovable-devroocodetask-managertaskstasks-listwindsurfwindsurf-ai
fix(contextGatherer): cannot read properties of undefined reading forEach (#789)
Ralph Khreish8cde6c27087f
diff --git a/.changeset/rotten-months-brake.md b/.changeset/rotten-months-brake.mdnew file mode 100644index 00000000..6d72979b--- /dev/null+++ b/.changeset/rotten-months-brake.md@@ -0,0 +1,5 @@+---+"task-master-ai": patch+---++Fix contextGatherer bug when adding a task `Cannot read properties of undefined (reading 'forEach')`diff --git a/scripts/modules/utils/contextGatherer.js b/scripts/modules/utils/contextGatherer.jsindex 29721858..1a826dec 100644--- a/scripts/modules/utils/contextGatherer.js+++ b/scripts/modules/utils/contextGatherer.js@@ -123,7 +123,7 @@ export class ContextGatherer {// Dependency Graph Analysisif (dependencyTasks.length > 0) {- const dependencyResults = this._buildDependencyContext(dependencyTasks);+ const dependencyResults = this._buildDependencyGraphs(dependencyTasks);dependencyResults.allRelatedTaskIds.forEach((id) =>finalTaskIds.add(String(id)));