File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,12 @@ private void WriteParameterHelp(dynamic helpContent)
198
198
{
199
199
Collection < string > helpBlock ;
200
200
201
- if ( string . IsNullOrEmpty ( helpContent ? . Description ? [ 0 ] ? . Text ) )
201
+ if ( helpContent ? . Description is not string descriptionText )
202
+ {
203
+ descriptionText = helpContent ? . Description ? [ 0 ] ? . Text ;
204
+ }
205
+
206
+ if ( descriptionText is null )
202
207
{
203
208
helpBlock = new Collection < string > ( )
204
209
{
@@ -216,7 +221,7 @@ private void WriteParameterHelp(dynamic helpContent)
216
221
string . Empty
217
222
} ;
218
223
219
- string text = helpContent . Description [ 0 ] . Text ;
224
+ string text = descriptionText ;
220
225
if ( text . Contains ( "\n " ) )
221
226
{
222
227
string [ ] lines = text . Split ( new char [ ] { '\n ' } , StringSplitOptions . RemoveEmptyEntries ) ;
You can’t perform that action at this time.
0 commit comments