Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
Co-Authored-By: yaacovCR <[email protected]>
  • Loading branch information
JoviDeCroock and yaacovCR committed Jun 19, 2024
1 parent f6fd3cf commit 516cfd2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/validation/rules/OverlappingFieldsCanBeMergedRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,18 @@ const processDiscoveredFragments = (
fieldMap: NodeAndDefCollection,
discoveredFragments: Array<Array<string>>,
) => {
while (discoveredFragments.length !== 0) {
const item = discoveredFragments.pop();
let item;
while ((item = discoveredFragments.pop()) !== undefined) {
const [fragmentName, referencedFragmentName] = item;
if (
!item ||
comparedFragmentPairs.has(item[1], item[0], areMutuallyExclusive)
comparedFragmentPairs.has(
referencedFragmentName,
fragmentName,
areMutuallyExclusive,
)
) {
continue;
}
const [fragmentName, referencedFragmentName] = item;
comparedFragmentPairs.add(
referencedFragmentName,
fragmentName,
Expand Down

0 comments on commit 516cfd2

Please sign in to comment.