diff --git a/src/mapper/mapper.ts b/src/mapper/mapper.ts index 3c6e4017a..4ba156d09 100644 --- a/src/mapper/mapper.ts +++ b/src/mapper/mapper.ts @@ -63,7 +63,7 @@ export function toDb(item: T, modelConstructor?: ModelConstructor): Attrib let attributeValue: Attribute | undefined | null - if (propertyValue === undefined || propertyValue === null) { + if (propertyValue === undefined) { // noop ignore because we can't map it } else { /* @@ -274,7 +274,7 @@ export function fromDb(attributeMap: Attributes, modelConstructor?: ModelC modelValue = fromDbOne(attributeValue) } - if (modelValue !== null && modelValue !== undefined) { + if (modelValue !== undefined) { Reflect.set(model, propertyMetadata ? propertyMetadata.name : attributeName, modelValue) } })