From: Lucas Di Pentima Date: Fri, 16 Aug 2019 14:24:45 +0000 (-0300) Subject: 15407: Restricts mapKeys' recursion to only "items" keys, to support listing. X-Git-Tag: 2.0.0~40^2~9 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/692582f3b80fa8f886d4ddb37055d71b3c3db14d 15407: Restricts mapKeys' recursion to only "items" keys, to support listing. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/services/common-service/common-service.ts b/src/services/common-service/common-service.ts index 07ff398a..212f2f4d 100644 --- a/src/services/common-service/common-service.ts +++ b/src/services/common-service/common-service.ts @@ -54,7 +54,7 @@ export class CommonService { .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));