Skip to content

Commit

Permalink
fix(siblings) Update the names of siblings utils args for readability (
Browse files Browse the repository at this point in the history
…#5269)

Co-authored-by: Chris Collins <chriscollins@Chriss-MBP-2-193.lan>
  • Loading branch information
chriscollins3456 and Chris Collins authored Jun 28, 2022
1 parent 5455122 commit 86deafb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions datahub-web-react/src/app/entity/shared/siblingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
Expand Down

0 comments on commit 86deafb

Please sign in to comment.