From c11406c615e0c5fd09e21c1e668b683afe3cf904 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 12 Jul 2018 11:26:02 -0400 Subject: [PATCH] Order --- app/migration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/migration.js b/app/migration.js index 6fe9ee9..762062a 100644 --- a/app/migration.js +++ b/app/migration.js @@ -15,7 +15,7 @@ EmbarkJS.onReady(async (err) => { const numPolls = await nPolls().call(); const polls = []; - for (let i = numPolls - 1; i >= 0; i--) { + for (let i = 0; i < numPolls; i++) { const p = await poll(i).call(); console.log(`_polls[${i}] = Poll({canceled: ${p._canceled}, description: "${p._description}", startBlock: ${p._startBlock}, endBlock: ${p._endBlock}, qvResults: ${p._qvResults}, results: ${p._results}, voters: ${p._voters}});`);