Skip to content

Commit e75b02a

Browse files
committed
Tweak
Signed-off-by: moznion <moznion@mail.moznion.net>
1 parent ec9ca62 commit e75b02a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dynamodb_primitive_types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export function dynamodbPrimitiveValueToJSValueConvertingOp(
6565
switch (primitiveType) {
6666
case DynamodbPrimitiveTypes.Number:
6767
return {
68-
leftOp: '(() => { const n = Number(',
69-
rightOp: '); return isNaN(n) ? undefined : n; })()',
68+
leftOp: '(() => { const numStr = ',
69+
rightOp: '; return numStr === undefined ? undefined : Number(numStr); })()',
7070
};
7171
case DynamodbPrimitiveTypes.Null:
7272
return {

0 commit comments

Comments
 (0)