Skip to content

Commit

Permalink
chore: simplify condition in convertToMapAttr
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Feb 9, 2021
1 parent 0229209 commit db48226
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/util-dynamodb/src/convertToAttr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ const convertToMapAttr = (
const map: { [key: string]: AttributeValue } = {};
for (const key in data) {
const value = data[key];
if (
typeof value !== "function" &&
(!options?.removeUndefinedValues || (options?.removeUndefinedValues && value !== undefined))
) {
if (typeof value !== "function" && (value !== undefined || !options?.removeUndefinedValues)) {
map[key] = convertToAttr(value, options);
}
}
Expand Down

0 comments on commit db48226

Please sign in to comment.