Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
fix(lib-dynamodb): additional checks for function type in processObj
  • Loading branch information
siddsriv committed Jan 24, 2024
commit 053a4a8ca54ef1a012e8ea2e8e4480dc6beaaf0f
4 changes: 2 additions & 2 deletions lib/lib-dynamodb/src/commands/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const processKeysInObj = (obj: any, processFunc: Function, keyNodes: KeyNodeChil
continue;
}
const processedValue = processObj(obj[nodeKey], processFunc, nodes);
if (processedValue !== undefined) {
if (processedValue !== undefined && typeof processedValue !== "function") {
accumulator[nodeKey] = processedValue;
}
}
Expand All @@ -94,7 +94,7 @@ const processAllKeysInObj = (obj: any, processFunc: Function, keyNodes: KeyNodes
return acc;
}
const processedValue = processObj(value, processFunc, keyNodes);
if (processedValue !== undefined) {
if (processedValue !== undefined && typeof processedValue !== "function") {
acc[key] = processedValue;
}
return acc;
Expand Down