Skip to content

Commit 0049176

Browse files
fix: visitor unskips nodes correctly
1 parent c5131f6 commit 0049176

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Sources/GraphQL/Language/Visitor.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,14 @@ func visitInParallel(visitors: [Visitor]) -> Visitor {
304304
} else if case .node = result {
305305
return result
306306
}
307-
} // else if case let .node(skippedNode) = skipping[i], skippedNode == node {
308-
// skipping[i] = nil
309-
// }
307+
} else if
308+
case let .node(skippedNodeValue) = skipping[i],
309+
let skippedNode = skippedNodeValue,
310+
skippedNode.kind == node.kind,
311+
skippedNode.loc == node.loc
312+
{
313+
skipping[i] = nil
314+
}
310315
}
311316

312317
return .continue

0 commit comments

Comments
 (0)