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
Details of the browser/Node.js/ReactNative version
tested in Node.js v14.15.4
Steps to reproduce
Run the following file:
index.ts
constAWS=require("aws-sdk");const{ marshall }=require("@aws-sdk/util-dynamodb");(async()=>{constinput={a: 1,b: 2};console.log("v2 pure object: "+JSON.stringify(AWS.DynamoDB.Converter.marshall(input)));console.log("v3 pure object: "+JSON.stringify(marshall(input)));console.log("v2 object from Object.create(): "+JSON.stringify(AWS.DynamoDB.Converter.marshall(Object.create(input))));console.log("v3 object from Object.create(): "+JSON.stringify(marshall(Object.create(input))));})();
Observed behavior
The properties a and b from prototype chain are not marshalled in v3.
Output
v2 pure object: {"a":{"N":"1"},"b":{"N":"2"}}
v3 pure object: {"a":{"N":"1"},"b":{"N":"2"}}
v2 object from Object.create(): {"a":{"N":"1"},"b":{"N":"2"}}
v3 object from Object.create(): {}
Expected behavior
The properties from prototype chain are marshalled.
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
util-dynamodb doesn't marshall properties in prototype chain
Your environment
SDK version number
"@aws-sdk/util-dynamodb": "3.4.0",
"aws-sdk": "2.832.0"
Is the issue in the browser/Node.js/ReactNative?
All
Details of the browser/Node.js/ReactNative version
tested in Node.js v14.15.4
Steps to reproduce
Run the following file:
index.ts
Observed behavior
The properties
a
andb
from prototype chain are not marshalled in v3.Output
Expected behavior
The properties from prototype chain are marshalled.
Additional context
Refs: #1861
The text was updated successfully, but these errors were encountered: