From 52769cce29a51728ece096f83c3908ff428f4768 Mon Sep 17 00:00:00 2001 From: Alexander Mays Date: Tue, 2 Feb 2016 10:03:54 -0500 Subject: [PATCH] Fixed the missing variable declarations on iterators. This makes running the tests in ES6 pass! Signed-off-by: Alexander Mays --- ExportAdapter.js | 2 +- RestQuery.js | 2 +- spec/helper.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ExportAdapter.js b/ExportAdapter.js index 89cb6c5900..4030ae4098 100644 --- a/ExportAdapter.js +++ b/ExportAdapter.js @@ -232,7 +232,7 @@ ExportAdapter.prototype.handleRelationUpdates = function(className, } if (op.__op == 'Batch') { - for (x of op.ops) { + for (var x of op.ops) { process(x, key); } } diff --git a/RestQuery.js b/RestQuery.js index f136206af4..8c9bf712da 100644 --- a/RestQuery.js +++ b/RestQuery.js @@ -434,7 +434,7 @@ function includePath(config, auth, response, path) { function findPointers(object, path) { if (object instanceof Array) { var answer = []; - for (x of object) { + for (var x of object) { answer = answer.concat(findPointers(x, path)); } return answer; diff --git a/spec/helper.js b/spec/helper.js index 255d61f810..761796a66e 100644 --- a/spec/helper.js +++ b/spec/helper.js @@ -153,7 +153,7 @@ function normalize(obj) { return '[' + obj.map(normalize).join(', ') + ']'; } var answer = '{'; - for (key of Object.keys(obj).sort()) { + for (var key of Object.keys(obj).sort()) { answer += key + ': '; answer += normalize(obj[key]); answer += ', '; @@ -192,7 +192,7 @@ function mockFacebook() { function clearData() { var promises = []; - for (conn in DatabaseAdapter.dbConnections) { + for (var conn in DatabaseAdapter.dbConnections) { promises.push(DatabaseAdapter.dbConnections[conn].deleteEverything()); } return Promise.all(promises);