aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/connection.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/connection.js')
-rw-r--r--web/src/js/connection.js6
1 files changed, 5 insertions, 1 deletions
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);