X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3e467c1a87339c399f63db00b15bf34ac8781e31..542c909d574067382de91721b42d5f05da4035da:/src/views/process-panel/process-io-card.tsx

diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx
index 82846128..b5bc08bc 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -287,7 +287,7 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
                                         <ProcessIORaw data={raw} />
                                     </div>}
                             </>}
-                        {!loading && raw && Object.keys(raw).length === 0 && <Grid container item alignItems='center' justify='center'>
+                        {!loading && !hasRaw && !hasParams && <Grid container item alignItems='center' justify='center'>
                             <DefaultView messages={["No parameters found"]} />
                         </Grid>}
                     </>) :
@@ -548,14 +548,14 @@ export const getIOParamDisplayValue = (auth: AuthState, input: CommandInputParam
 
         case isArrayOfType(input, CWLType.FILE):
             const fileArrayMainFiles = ((input as FileArrayCommandInputParameter).value || []);
-            const firstMainFilePdh = fileArrayMainFiles.length > 0 ? getResourcePdhUrl(fileArrayMainFiles[0], pdh) : "";
+            const firstMainFilePdh = (fileArrayMainFiles.length > 0 && fileArrayMainFiles[0]) ? getResourcePdhUrl(fileArrayMainFiles[0], pdh) : "";
 
             // Convert each main file into separate arrays of ProcessIOValue to preserve secondaryFile grouping
             const fileArrayValues = fileArrayMainFiles.map((mainFile: File, i): ProcessIOValue[] => {
                 const secondaryFiles = ((mainFile as unknown) as FileWithSecondaryFiles)?.secondaryFiles || [];
                 return [
                     // Pass firstMainFilePdh to secondary files and every main file besides the first to hide pdh if equal
-                    fileToProcessIOValue(mainFile, false, auth, pdh, i > 0 ? firstMainFilePdh : ""),
+                    ...(mainFile ? [fileToProcessIOValue(mainFile, false, auth, pdh, i > 0 ? firstMainFilePdh : "")] : []),
                     ...(secondaryFiles.map(file => fileToProcessIOValue(file, true, auth, pdh, firstMainFilePdh)))
                 ];
             // Reduce each mainFile/secondaryFile group into single array preserving ordering
