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), });