Skip to content

fix: Error due to missing null check #8276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

kchindam-infy
Copy link

@kchindam-infy kchindam-infy commented May 6, 2025

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 kchindam-infy requested a review from a team as a code owner May 6, 2025 14:48
@kchindam-infy kchindam-infy marked this pull request as draft May 6, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant