spmallette commented on code in PR #3194:
URL: https://github.com/apache/tinkerpop/pull/3194#discussion_r2310707480
##########
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js:
##########
@@ -79,10 +79,19 @@ class Edge extends Element {
this.inV = inV;
this.properties = {};
if (properties) {
- const keys = Object.keys(properties);
- for (let i = 0; i < keys.length; i++) {
- const k = keys[i];
- this.properties[k] = properties[k].value;
+ if (Array.isArray(properties)) {
Review Comment:
no. doing this here in `Edge` preserves the map structure for `properties`
that was there before irrespective of what the serializer decides to send in
the constructor. `Vertex` and `VertexProperty` just had a direct assignment
which just accepted what the serializer gave it (with all the weirdness that
comes with that), so i left that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]