From 4acd777b6c4494cc7f36bf9f137053e1c42f2715 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 14 Feb 2013 11:40:14 +0100 Subject: [PATCH] fixed jslint warnings --- js/client/client.js | 2 +- js/common/bootstrap/module-internal.js | 4 ++-- js/server/modules/org/arangodb/ahuacatl.js | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/js/client/client.js b/js/client/client.js index c834839934..755063abb1 100755 --- a/js/client/client.js +++ b/js/client/client.js @@ -104,7 +104,7 @@ function clear () { if (internal.ARANGO_QUIET !== true) { if (typeof internal.arango !== "undefined") { if (typeof internal.arango.isConnected !== "undefined") { - if (internal.arango.isConnected() && typeof SYS_UNIT_TESTS == "undefined") { + if (internal.arango.isConnected() && typeof SYS_UNIT_TESTS === "undefined") { internal.print(arangosh.HELP); } } diff --git a/js/common/bootstrap/module-internal.js b/js/common/bootstrap/module-internal.js index 00bcae9954..e3e549b474 100644 --- a/js/common/bootstrap/module-internal.js +++ b/js/common/bootstrap/module-internal.js @@ -733,7 +733,7 @@ internal.startCaptureMode = function () { internal.outputBuffer = ""; internal.output = internal.bufferOutput; - } + }; //////////////////////////////////////////////////////////////////////////////// /// @brief stop capture mode @@ -746,7 +746,7 @@ internal.output = internal.stdOutput; return buffer; - } + }; //////////////////////////////////////////////////////////////////////////////// /// @brief start color printing diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index 3a87e163d4..c89a8126e9 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -2864,21 +2864,23 @@ function GRAPH_TRAVERSAL_TREE (vertexCollection, function GRAPH_EDGES (edgeCollection, vertex, direction) { - var c = COLLECTION(edgeCollection); + var c = COLLECTION(edgeCollection), result; // validate arguments if (direction === "outbound") { - return c.outEdges(vertex); + result = c.outEdges(vertex); } else if (direction === "inbound") { - return c.inEdges(vertex); + result = c.inEdges(vertex); } else if (direction === "any") { - return c.edges(vertex); + result = c.edges(vertex); } else { THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, "EDGES"); } + + return result; } ////////////////////////////////////////////////////////////////////////////////