Skip to content

Commit

Permalink
save some array allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jun 19, 2024
1 parent 56deb05 commit 54e1e06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation/rules/OverlappingFieldsCanBeMergedRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ function findConflictsWithinSelectionSet(
fieldMap,
);

const discoveredFragments: Array<[string, string]> = [];
if (fragmentNames.length !== 0) {
const discoveredFragments: Array<[string, string]> = [];
// (B) Then collect conflicts between these fields and those represented by
// each spread fragment name found.
for (let i = 0; i < fragmentNames.length; i++) {
Expand Down

0 comments on commit 54e1e06

Please sign in to comment.