diff options
author | nlf <quitlahok@gmail.com> | 2022-04-14 01:03:37 +0300 |
---|---|---|
committer | Luke Karrys <luke@lukekarrys.com> | 2022-04-20 02:22:20 +0300 |
commit | 3d964940f410052918e37a9b05818fe9dc4cd86a (patch) | |
tree | 6d9266b9db42d21c4e8e6bf89475f0aef4acacee /workspaces/arborist/lib | |
parent | 4ca858c4e210781f369c4403e711dbbbbe5aaca6 (diff) |
fix(arborist): when replacing a Link with a Node, make sure to remove the Link target from the root
Diffstat (limited to 'workspaces/arborist/lib')
-rw-r--r-- | workspaces/arborist/lib/node.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/workspaces/arborist/lib/node.js b/workspaces/arborist/lib/node.js index c79bc0bd3..abd54ffe9 100644 --- a/workspaces/arborist/lib/node.js +++ b/workspaces/arborist/lib/node.js @@ -1149,6 +1149,9 @@ class Node { for (const kid of node.children.values()) { kid.parent = this } + if (node.isLink && node.target) { + node.target.root = null + } } if (!node.isRoot) { |