Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created May 19, 2021 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/8a4b55782cc0f0570c148582ab833c4c to your computer and use it in GitHub Desktop.
Save isaacs/8a4b55782cc0f0570c148582ab833c4c to your computer and use it in GitHub Desktop.
diff --git a/lib/node.js b/lib/node.js
index 1bb84140..d17e4b2a 100644
--- a/lib/node.js
+++ b/lib/node.js
@@ -400,6 +400,10 @@ class Node {
for (const edge of edges)
why.dependents.push(edge.explain(seen))
}
+
+ if (this.linksIn.size)
+ why.linksIn = [...this.linksIn].map(link => link[_explain](edge, seen))
+
return why
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment