Skip to content

Commit

Permalink
refactor(graphql,federation,doug-martin#1051): cleaned up unnecessary…
Browse files Browse the repository at this point in the history
… code
  • Loading branch information
mwoelk committed Apr 9, 2021
1 parent 5100cee commit d925826
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const pluckFields = <DTO, Relation>(dto: DTO, fieldMap: ReferencesKeys<DTO, Rela
};

const allFieldsAreNull = <Relation>(fields: Partial<Relation>): boolean => {
return Object.entries(fields).reduce<boolean>(
(previousNull, [, value]) => previousNull && (value === null || value === undefined),
return Object.values(fields).reduce<boolean>(
(previousNull, value) => previousNull && (value === null || value === undefined),
true,
);
};
Expand Down

0 comments on commit d925826

Please sign in to comment.