diff --git a/js/server/modules/org/arangodb/aql-helper.js b/js/server/modules/org/arangodb/aql-helper.js index a8ad909f69..4ea7f77e5a 100644 --- a/js/server/modules/org/arangodb/aql-helper.js +++ b/js/server/modules/org/arangodb/aql-helper.js @@ -120,10 +120,12 @@ function getRawQueryResults (query, bindVars) { } var rows = [ ]; + var func = function (row) { + rows.push(row); + }; + while (queryResult.hasNext()) { - queryResult.toArray().forEach(function(row) { - rows.push(row); - }); + queryResult.toArray().forEach(func); } return rows; } diff --git a/js/server/version-check.js b/js/server/version-check.js index 421c80e8b1..97f7ee8365 100644 --- a/js/server/version-check.js +++ b/js/server/version-check.js @@ -458,7 +458,7 @@ if (oldKey !== newKey) { try { - doc = { + var doc = { _key: newKey.toUpperCase(), name: newKey, code: f.code,