vkagamlyk commented on code in PR #3242:
URL: https://github.com/apache/tinkerpop/pull/3242#discussion_r2442554346


##########
gremlin-javascript/src/main/javascript/gremlin-javascript/test/integration/client-tests.js:
##########
@@ -119,17 +119,11 @@ describe('Client', function () {
           assert.strictEqual(result.length, 1);
           const vertex = result.first();
           assert.ok(vertex instanceof graphModule.Vertex);
-          // if/then until TINKERPOP-3186
           let age, name
-          if (vertex.properties instanceof Array) {
-            const ageProps = vertex.properties.filter(p => p.key === 'age');
-            const nameProps = vertex.properties.filter(p => p.key === 'name');
-            age = ageProps[0];
-            name = nameProps[0];
-          } else {
-            age = vertex.properties.age[0]
-            name = vertex.properties.name[0]
-          }
+          const ageProps = vertex.properties.filter(p => p.key === 'age');

Review Comment:
   nit: can be simplified to something like
   `const age = vertex.properties.find(p => p.key === 'age');`



-- 
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]

Reply via email to