You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/10/08 19:02:06 UTC

[tinkerpop] 02/12: Refactor of RemoteStrategy apply()

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-1959-tp33
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 4b5d25aa23b4ab848d9361a5504093ec0f3afe16
Author: Matthew Allen <ma...@runbox.com>
AuthorDate: Fri Aug 24 16:14:29 2018 +0100

    Refactor of RemoteStrategy apply()
---
 .../javascript/gremlin-javascript/lib/driver/remote-connection.js    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/remote-connection.js
index d93d89b..96db161 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/remote-connection.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/remote-connection.js
@@ -74,9 +74,8 @@ class RemoteStrategy extends TraversalStrategy {
     let args = null;
 
     // check if the last instruction is an eval statement
-    const bytecode = traversal.getBytecode();
-    if (bytecode.stepInstructions.length && bytecode.stepInstructions[bytecode.stepInstructions.length-1][0] === 'eval') {
-      const script = traversal.getBytecode().toScript();
+    if (instructions.stepInstructions.length && instructions.stepInstructions[instructions.stepInstructions.length-1][0] === 'eval') {
+      const script = instructions.toScript();
       op = 'eval';
       processor = '';
       args = {