You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
This line does not identify objects created with a null prototype (i.e. Object.create(null)) and thus tries to decode a null-prototype object as a scalar value, eventually throwing the following error:
{
type: 'aws',
err: TypeError: Cannot convert object to primitive value
at convertToScalarAttr (/home/eric/workspace/stratos/node_modules/@aws-sdk/util-dynamodb/src/convertToAttr.ts:122:47)
at Object.convertToAttr (/home/eric/workspace/stratos/node_modules/@aws-sdk/util-dynamodb/src/convertToAttr.ts:20:12)
at Object.marshall (/home/eric/workspace/stratos/node_modules/@aws-sdk/util-dynamodb/src/marshall.ts:29:41)
at /home/eric/workspace/stratos/aws/lib/src/dynamo.ts:241:30
at MapSink.event (/home/eric/workspace/stratos/node_modules/most/lib/fusion/Map.js:71:22)
at TapSink.event (/home/eric/workspace/stratos/node_modules/most/lib/combinator/transform.js:81:13)
at MapSink.event (/home/eric/workspace/stratos/node_modules/most/lib/fusion/Map.js:71:13)
at PropagateTask.runJust [as _run] (/home/eric/workspace/stratos/node_modules/most/lib/source/core.js:46:8)
at PropagateTask.run (/home/eric/workspace/stratos/node_modules/most/lib/scheduler/PropagateTask.js:43:8)
at ScheduledTask.run (/home/eric/workspace/stratos/node_modules/most/lib/scheduler/ScheduledTask.js:20:20)
}
SDK version number
Installed from source today, so > 3.1.0 (currently unpublished)
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
v14.15.3
To Reproduce (observed behavior)
Try to marshall an object created with Object.create(null)
Expected behavior marshall should marshall null-prototype objects in exactly the same was as it marshalls objects created with {}.
The text was updated successfully, but these errors were encountered:
Using Object.entries() on an object created via Object.create() results in an empty array being returned. The code to convert object needs to be modified.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Describe the bug
A clear and concise description of what the bug is.
This line does not identify objects created with a null prototype (i.e.
Object.create(null)
) and thus tries to decode a null-prototype object as a scalar value, eventually throwing the following error:SDK version number
Installed from source today, so > 3.1.0 (currently unpublished)
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
v14.15.3
To Reproduce (observed behavior)
Try to marshall an object created with
Object.create(null)
Expected behavior
marshall
should marshall null-prototype objects in exactly the same was as it marshalls objects created with{}
.The text was updated successfully, but these errors were encountered: