File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -150,22 +150,21 @@ export default class SchemaPlugin extends Plugin implements PluginInterface {
150150 }
151151
152152 argumentDescription ( arg : InputValue ) : string [ ] {
153-
154- const desc = arg . description === null ?
153+ const desc = ! arg . description ?
155154 '[' + this . html . highlight ( 'Not documented' ) + ']' : arg . description ;
156155
157156 return this . description ( this . html . highlight ( arg . name ) + ': ' + desc ) ;
158157 }
159158
160159 argumentsDescription ( fieldOrDirectives : Field | Directive ) : string [ ] {
161-
162- if ( fieldOrDirectives . args . length === 0 ) {
160+ const argsWithDescriptions = fieldOrDirectives . args . filter ( arg => arg . description ) ;
161+ if ( argsWithDescriptions . length === 0 ) {
163162 return [ ] ;
164163 }
165164
166165 const reduceArguments = ( descriptions : string [ ] , arg : InputValue ) => descriptions . concat ( this . argumentDescription ( arg ) ) ;
167166
168- return fieldOrDirectives . args
167+ return argsWithDescriptions
169168 . reduce ( reduceArguments , [ this . html . comment ( 'Arguments' ) ] ) ;
170169 }
171170
You can’t perform that action at this time.
0 commit comments