From 2217afaa642e86ec9d65f667e245570f9b5e07f7 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 22:33:07 +1000 Subject: [PATCH] demo state check --- client/src/events.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 05b01677..216af011 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -206,6 +206,7 @@ function registerEvents(store) { } function setDemo(d) { + const initial = { players: d, combiner: [], @@ -215,7 +216,8 @@ function registerEvents(store) { }; const startDemo = () => { - console.log(initial); + const { account } = store.getState(); + if (account) return false; store.dispatch(actions.setDemo(initial)); store.dispatch(actions.setAnimTarget(null)); setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0] }))), 2000);