16086: Looks up input values by the correct input id.
[arvados-workbench2.git] / src / views-components / process-input-dialog / process-input-dialog.tsx
index a2d5940777ed4286586517732e80e42e0b807745..6ccf264ca099eda3debd824de5ad993381bca176 100644 (file)
@@ -36,15 +36,14 @@ export const ProcessInputDialog = withDialog(PROCESS_INPUT_DIALOG_NAME)(
 const getInputs = (data: any) => {
     if (!data || !data.mounts || !data.mounts[MOUNT_PATH_CWL_WORKFLOW]) { return []; }
     const inputs = getWorkflowInputs(data.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
-    return inputs ? inputs.map(
-        (it: any) => (
+    return inputs
+        ? inputs.map( (it: any) => (
             {
                 type: it.type,
                 id: it.id,
                 label: it.label,
-                value: data.mounts[MOUNT_PATH_CWL_INPUT].content[it.id],
+                value: data.mounts[MOUNT_PATH_CWL_INPUT].content[it.id.split('#main/')[1]] || [],
                 disabled: true
-            }
-        )
-    ) : [];
+            }))
+        : [];
 };