15407: Restricts mapKeys' recursion to only "items" keys, to support listing.
[arvados-workbench2.git] / src / services / common-service / common-service.ts
index 07ff398a4abdd7d4409bb67dd660e02f304af359..212f2f4d0305fbf36a54bce6393a16506ff2d005 100644 (file)
@@ -54,7 +54,7 @@ export class CommonService<T> {
                         .map(key => [key, mapFn(key)])
                         .reduce((newValue, [key, newKey]) => ({
                             ...newValue,
-                            [newKey]: CommonService.mapKeys(mapFn)(value[key])
+                            [newKey]: (key === 'items') ? CommonService.mapKeys(mapFn)(value[key]) : value[key]
                         }), {});
                 case _.isArray(value):
                     return value.map(CommonService.mapKeys(mapFn));