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 @@ -668,27 +668,20 @@ function sameDirectiveArgument(
668
668
directive2 : DirectiveNode ,
669
669
argumentName : string ,
670
670
) : boolean {
671
- if ( ! directive1 . arguments ) {
671
+ /* istanbul ignore next (See https://github.com/graphql/graphql-js/issues/2203) */
672
+ const args1 = directive1 . arguments || [ ] ;
673
+ const arg1 = find ( args1 , argument => argument . name . value === argumentName ) ;
674
+ if ( ! arg1 ) {
672
675
return false ;
673
676
}
674
- const argument1 = find (
675
- directive1 . arguments ,
676
- argument => argument . name . value === argumentName ,
677
- ) ;
678
- if ( ! argument1 ) {
679
- return false ;
680
- }
681
- if ( ! directive2 . arguments ) {
682
- return false ;
683
- }
684
- const argument2 = find (
685
- directive2 . arguments ,
686
- argument => argument . name . value === argumentName ,
687
- ) ;
688
- if ( ! argument2 ) {
677
+
678
+ /* istanbul ignore next (See https://github.com/graphql/graphql-js/issues/2203) */
679
+ const args2 = directive2 . arguments || [ ] ;
680
+ const arg2 = find ( args2 , argument => argument . name . value === argumentName ) ;
681
+ if ( ! arg2 ) {
689
682
return false ;
690
683
}
691
- return sameValue ( argument1 . value , argument2 . value ) ;
684
+ return sameValue ( arg1 . value , arg2 . value ) ;
692
685
}
693
686
694
687
function getStreamDirective (
You can’t perform that action at this time.
0 commit comments