15768: fixed 422 err showing in browser Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-action-set.ts
index 55da667654332a3363ec3163bbe19bc71bff9a46..86c850f08f717db536769e2c87a62428ea6a0292 100644 (file)
@@ -127,7 +127,9 @@ export const collectionActionSet: ContextMenuActionSet = [
             component: ToggleTrashAction,
             name: "ToggleTrashAction",
             execute: (dispatch, resources: ContextMenuResource[]) => {
-                resources.forEach(resource => dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)));
+                for (const resource of resources) {
+                    dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
+                }
             },
         },
     ],
@@ -157,7 +159,9 @@ export const oldCollectionVersionActionSet: ContextMenuActionSet = [
             icon: RestoreVersionIcon,
             name: "Restore version",
             execute: (dispatch, resources) => {
-                resources.forEach(({ uuid }) => dispatch<any>(openRestoreCollectionVersionDialog(uuid)));
+                for (const resource of resources) {
+                    dispatch<any>(openRestoreCollectionVersionDialog(resource.uuid));
+                }
             },
         },
     ],