Skip to content

Commit 478d2b3

Browse files
fix: Fixes visitor path generation bug
1 parent a3136ac commit 478d2b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/GraphQL/Language/Visitor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func visit(root: Node, visitor: Visitor, keyMap: [Kind: [String]] = [:]) -> Node
100100
let isEdited = isLeaving && !edits.isEmpty
101101

102102
if isLeaving {
103-
key = ancestors.isEmpty ? nil : path.popLast()
103+
key = ancestors.isEmpty ? nil : path.last
104104
node = parent
105105
parent = ancestors.popLast()
106106

0 commit comments

Comments
 (0)