From 4641b639f05d8ab5c8040e23aa5c1d03f25c8d0b Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Thu, 22 Dec 2022 09:28:18 +0100 Subject: [PATCH] fix: DynamoDB node type issues --- packages/nodes-base/nodes/Aws/DynamoDB/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }