cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: Error due to missing null check

Open kchindam-infy opened this issue 7 months ago • 0 comments

PROBLEM: The PR enhances to address the issue "TypeError:cannot read properties of undefined (reading isProjectRoot) identified the root cause of the issue and implemented the solution. The changes in reify.js handle cases where isProjectRoot is undefined.The code assumes all nodes in the dependency tree have the isProjectRoot property. However, in some cases(e.g, when a dependency is missing or improperly linked) the node object is undefined, leading to the error.

Solution:

  • Added a null/undefined check before accessing the isProjectRoot property.
  • Updated the logic in reify.js to ensure that the code gracefully handles cases where the node object is undefined.

Reference: #7067

kchindam-infy avatar May 06 '25 14:05 kchindam-infy