From 14724ae7b4d025c3427681e052b69d65a215e5d8 Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Fri, 26 Jan 2018 09:46:58 +0100 Subject: [PATCH] Fix node 4 compatibility --- index.js | 6 ++++-- tests/index-test.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index f794abb..675a451 100644 --- a/index.js +++ b/index.js @@ -186,7 +186,8 @@ module.exports = { }; return _list(opts) - .then(({ revisions }) => { + .then((data) => { + let revisions = data.revisions; revisions.forEach(r => { this.log(`${r.revision} | ${r.timestamp} | active: ${r.active}`, {verbose: true}); }); @@ -211,7 +212,8 @@ module.exports = { }; return _list(opts, this) - .then(({ revisions }) => { + .then((data) => { + let revisions = data.revisions; revisions.forEach(r => { this.log(`${r.revision} | ${r.timestamp} | active: ${r.active}`, {verbose: true}); }); diff --git a/tests/index-test.js b/tests/index-test.js index 921a61c..b8de73e 100644 --- a/tests/index-test.js +++ b/tests/index-test.js @@ -33,7 +33,8 @@ function cleanBucket() { }); } -function setupTestData(ops = {}) { +function setupTestData(options) { + let ops = options || {}; function addTestData() { let existingDists = ['dist-12.zip', 'dist-34.zip', 'dist-56.zip']; let promises = existingDists.map((n) => {