Skip to content

Commit

Permalink
refactor(graphql,federation,#1051): cleaned up unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
mwoelk authored and doug-martin committed Apr 12, 2021
1 parent 46291c7 commit a0d587c
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 a0d587c

Please sign in to comment.