diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts b/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts index 4bbb572a13233..7d910ca68a0d2 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts @@ -70,7 +70,7 @@ export function simplify(item: IAttributeValue): IDataObject { return output; } -function decodeAttribute(type: AttributeValueType, attribute: string) { +function decodeAttribute(type: AttributeValueType, attribute: string | IAttributeValue) { switch (type) { case 'BOOL': return Boolean(attribute); @@ -82,7 +82,7 @@ function decodeAttribute(type: AttributeValueType, attribute: string) { case 'NS': return attribute; case 'M': - return simplify(attribute); + return simplify(attribute as IAttributeValue); default: return null; }