From e880f532ad3c66ebfded4655b7fa67a367a83cc7 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 4 Jun 2016 00:58:13 -0700 Subject: web interleave old store and redux flow state --- web/src/js/connection.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web/src/js/connection.js') diff --git a/web/src/js/connection.js b/web/src/js/connection.js index ac39a018..5961909e 100644 --- a/web/src/js/connection.js +++ b/web/src/js/connection.js @@ -13,8 +13,12 @@ export default function Connection(url, dispatch) { ws.onopen = function () { dispatch(webSocketActions.connected()) dispatch(flowActions.fetchFlows()) + // workaround to make sure that our state is already available. + .then(() => { + console.log("flows are loaded now") + ConnectionActions.open() + }) dispatch(eventLogActions.fetchLogEntries()) - ConnectionActions.open() }; ws.onmessage = function (m) { var message = JSON.parse(m.data); -- cgit v1.2.3