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(
6060 helpObject = powerShell . Invoke < PSObject > ( ) . FirstOrDefault ( ) ;
6161 }
6262
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 )
7064 {
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+ }
7275 }
7376
7477 return synopsisString ;
You can’t perform that action at this time.
0 commit comments