Skip to content

Commit

Permalink
refactor code style
Browse files Browse the repository at this point in the history
  • Loading branch information
akashgp09 committed Jul 15, 2021
1 parent 9770453 commit a510820
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/server/helpers/diffFormatters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ export function formatEndedChange(change) {
}

export function formatTypeChange(change, label) {
return formatChange(change, label, (side) => (typeof side === 'string' ? [side] : side && [side.label]));
// eslint-disable-next-line consistent-return
return formatChange(change, label, (side) => {
if (typeof side === 'string') {
return [side];
}
else if (side) {
return [side.label];
}
});
}

export function formatScalarChange(change, label) {
Expand Down

0 comments on commit a510820

Please sign in to comment.