From 5370f44868d5fddfc3f7f6d54af13e92a462efe3 Mon Sep 17 00:00:00 2001 From: Pierre-Gilles Leymarie Date: Mon, 30 Nov 2020 15:07:09 +0200 Subject: [PATCH] Fix #932: fix bug preventing starting a scene from the scene list (#993) --- front/src/routes/scene/SceneCard.jsx | 5 ++++- front/src/routes/scene/index.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/front/src/routes/scene/SceneCard.jsx b/front/src/routes/scene/SceneCard.jsx index 5ac5e07e41..71e73cdedf 100644 --- a/front/src/routes/scene/SceneCard.jsx +++ b/front/src/routes/scene/SceneCard.jsx @@ -9,7 +9,10 @@ class SceneCard extends Component { try { await this.setState({ saving: true }); await this.props.httpClient.post(`/api/v1/scene/${this.props.scene.selector}/start`); - } catch (e) {} + } catch (e) { + console.log(e); + } + // make sure the loader is displayed at least 200ms setTimeout(() => this.setState({ saving: false }), 200); }; diff --git a/front/src/routes/scene/index.js b/front/src/routes/scene/index.js index 8f8318bc9a..12eb7f93ab 100644 --- a/front/src/routes/scene/index.js +++ b/front/src/routes/scene/index.js @@ -4,7 +4,7 @@ import ScenePage from './ScenePage'; import actions from '../../actions/scene'; import { RequestStatus } from '../../utils/consts'; -@connect('scenes,currentUrl,scenesGetStatus', actions) +@connect('httpClient,scenes,currentUrl,scenesGetStatus', actions) class Scene extends Component { componentWillMount() { this.props.getScenes();