File tree Expand file tree Collapse file tree 1 file changed +10
-17
lines changed Expand file tree Collapse file tree 1 file changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -654,27 +654,20 @@ function sameDirectiveArgument(
654
654
directive2 : DirectiveNode ,
655
655
argumentName : string ,
656
656
) : boolean {
657
- if ( ! directive1 . arguments ) {
657
+ /* istanbul ignore next (See https://github.com/graphql/graphql-js/issues/2203) */
658
+ const args1 = directive1 . arguments || [ ] ;
659
+ const arg1 = find ( args1 , argument => argument . name . value === argumentName ) ;
660
+ if ( ! arg1 ) {
658
661
return false ;
659
662
}
660
- const argument1 = find (
661
- directive1 . arguments ,
662
- argument => argument . name . value === argumentName ,
663
- ) ;
664
- if ( ! argument1 ) {
665
- return false ;
666
- }
667
- if ( ! directive2 . arguments ) {
668
- return false ;
669
- }
670
- const argument2 = find (
671
- directive2 . arguments ,
672
- argument => argument . name . value === argumentName ,
673
- ) ;
674
- if ( ! argument2 ) {
663
+
664
+ /* istanbul ignore next (See https://github.com/graphql/graphql-js/issues/2203) */
665
+ const args2 = directive2 . arguments || [ ] ;
666
+ const arg2 = find ( args2 , argument => argument . name . value === argumentName ) ;
667
+ if ( ! arg2 ) {
675
668
return false ;
676
669
}
677
- return sameValue ( argument1 . value , argument2 . value ) ;
670
+ return sameValue ( arg1 . value , arg2 . value ) ;
678
671
}
679
672
680
673
function getStreamDirective (
You can’t perform that action at this time.
0 commit comments