From 86deafb73ea14415f052f93ec8b4a9d79a06e2e7 Mon Sep 17 00:00:00 2001 From: Chris Collins Date: Mon, 27 Jun 2022 21:25:56 -0400 Subject: [PATCH] fix(siblings) Update the names of siblings utils args for readability (#5269) Co-authored-by: Chris Collins --- .../src/app/entity/shared/siblingUtils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/datahub-web-react/src/app/entity/shared/siblingUtils.ts b/datahub-web-react/src/app/entity/shared/siblingUtils.ts index 93c08022f47a4..f280716922d89 100644 --- a/datahub-web-react/src/app/entity/shared/siblingUtils.ts +++ b/datahub-web-react/src/app/entity/shared/siblingUtils.ts @@ -43,20 +43,20 @@ const combineMerge = (target, source, options) => { const customMerge = (isPrimary, key) => { if (key === 'upstream' || key === 'downstream') { - return (a, _) => a; + return (_secondary, primary) => primary; } if (key === 'platform') { - return (a, b) => (isPrimary ? b : a); + return (secondary, primary) => (isPrimary ? primary : secondary); } if (key === 'tags' || key === 'terms' || key === 'assertions') { - return (a, b) => { - return merge(a, b, { + return (secondary, primary) => { + return merge(secondary, primary, { customMerge: customMerge.bind({}, isPrimary), }); }; } - return (a, b) => { - return merge(a, b, { + return (secondary, primary) => { + return merge(secondary, primary, { arrayMerge: combineMerge, customMerge: customMerge.bind({}, isPrimary), });