File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
src/PowerShellEditorServices/Language Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,18 @@ public static string GetCommandSynopsis(
60
60
helpObject = powerShell . Invoke < PSObject > ( ) . FirstOrDefault ( ) ;
61
61
}
62
62
63
- // Extract the synopsis string from the object
64
- synopsisString =
65
- ( string ) helpObject . Properties [ "synopsis" ] . Value ??
66
- string . Empty ;
67
-
68
- // Ignore the placeholder value for this field
69
- if ( string . Equals ( synopsisString , "SHORT DESCRIPTION" , System . StringComparison . InvariantCultureIgnoreCase ) )
63
+ if ( helpObject != null )
70
64
{
71
- synopsisString = string . Empty ;
65
+ // Extract the synopsis string from the object
66
+ synopsisString =
67
+ ( string ) helpObject . Properties [ "synopsis" ] . Value ??
68
+ string . Empty ;
69
+
70
+ // Ignore the placeholder value for this field
71
+ if ( string . Equals ( synopsisString , "SHORT DESCRIPTION" , System . StringComparison . InvariantCultureIgnoreCase ) )
72
+ {
73
+ synopsisString = string . Empty ;
74
+ }
72
75
}
73
76
74
77
return synopsisString ;
You can’t perform that action at this time.
0 commit comments