From 61a58f11bc513e1d7db5e2727eb24b04dac2e668 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 29 Mar 2015 19:38:50 +0200 Subject: [PATCH] refactor main --- lib/main.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/main.js b/lib/main.js index e43ada5..e54b0d5 100644 --- a/lib/main.js +++ b/lib/main.js @@ -123,17 +123,13 @@ function (config, moment, chroma, Router, Map, Sidebar, Tabs, Container, Meshsta ] Promise.all(urls.map(getJSON)) - .then(function (d) { - createGUI() - return d - }) .then(handleData) .then(function (d) { + createGUI() dataTargets.forEach(function (t) { t.setData(d) }) + router.start() }) - .then(function () { router.start() }) - } })