Skip to content

Commit

Permalink
fix(PathSelector):problem about PathSelector which gets the wrong Arr…
Browse files Browse the repository at this point in the history
…ayDepth
  • Loading branch information
罗瑜 committed May 8, 2022
1 parent 3e961de commit b0df9bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const transformDataSource = (node: TreeNode) => {
const transformRelativePath = (arrayNode: TreeNode, targetNode: TreeNode) => {
if (targetNode.depth === currentNode.depth)
return `.${targetNode.props.name || targetNode.id}`
return `${dots(currentNode.depth - arrayNode.depth)}[].${targetPath(
return `${dots(currentNode.depth - targetNode.depth)}[].${targetPath(
arrayNode,
targetNode
)}`
Expand Down

0 comments on commit b0df9bc

Please sign in to comment.