match_transform: Do not re-insert a TypeMatch if the item already exists
@@ -384,7 +384,7 @@ impl<'program> MatchTransform<'program> {
previous_match_for_type.fragment.location,
));
}
- }
+ } else {
matches.types.insert(
fragment.type_condition,
TypeMatch {
@@ -392,6 +392,7 @@ impl<'program> MatchTransform<'program> {
module_directive_name_argument,
},
);
+ }
// Done validating. Build out the resulting fragment spread.
let mut component_field_arguments = vec![build_string_literal_argument(
