Skip to content

Commit

Permalink
Fix DynamoDB DocumentClient set unmarshalling (#2647)
Browse files Browse the repository at this point in the history
* fix stringifying sets
* add changelog
  • Loading branch information
Chase Coalwell committed Apr 30, 2019
1 parent 5772c62 commit b6d3eba
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-DocumentClient-318ee4e7.json
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "DocumentClient",
"description": "Fixes issue stringifying sets by only including values."
}
8 changes: 8 additions & 0 deletions lib/dynamodb/set.js
Expand Up @@ -53,6 +53,14 @@ var DynamoDBSet = util.inherit({
});
}
}
},

/**
* Render the underlying values only when converting to JSON.
*/
toJSON: function() {
var self = this;
return self.values;
}

});
Expand Down
70 changes: 70 additions & 0 deletions test/dynamodb/document_client.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b6d3eba

Please sign in to comment.