@@ -156,7 +156,7 @@ private void GetScriptHistory()
156156 }
157157 }
158158
159- private string GetTrimmedText ( string source , int stringLength )
159+ private string GetTrimmedText ( string ? source , int stringLength )
160160 {
161161 if ( string . IsNullOrWhiteSpace ( source ) )
162162 {
@@ -171,6 +171,12 @@ private string GetTrimmedText(string source, int stringLength)
171171 return source [ 0 ..25 ] + "..." ;
172172 }
173173
174+ private string GetTrimmedText ( string [ ] ? source , int stringLength )
175+ {
176+ source ??= Array . Empty < string > ( ) ;
177+ return GetTrimmedText ( string . Join ( "" , source ) , stringLength ) ;
178+ }
179+
174180 private Task HandleValidSubmit ( )
175181 {
176182 if ( _device is null )
@@ -215,8 +221,8 @@ private void ShowFullScriptOutput(ScriptResult result)
215221 {
216222 void outputModal ( RenderTreeBuilder builder )
217223 {
218- var output = string . Join ( "\r \n " , $ " { result . StandardOutput } " ) ;
219- var error = string . Join ( "\r \n " , $ " { result . ErrorOutput } " ) ;
224+ var output = string . Join ( "\r \n " , result . StandardOutput ?? Array . Empty < string > ( ) ) ;
225+ var error = string . Join ( "\r \n " , result . ErrorOutput ?? Array . Empty < string > ( ) ) ;
220226 var textareaStyle = "width: 100%; height: 200px; white-space: pre;" ;
221227
222228 builder . AddMarkupContent ( 0 , "<h5>Input</h5>" ) ;
0 commit comments