From e8dadb187ba07cfcde771c7ee231a3fa7c38a01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Wed, 18 Aug 2021 14:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5=E4=BF=AE=E5=A4=8D=E9=95=9C?= =?UTF-8?q?=E5=83=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Detail.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 2d17e661..277f4f98 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -216,7 +216,7 @@ class Detail extends Component { if(num){ this.setState({ secondSync:true, - firsrtSync:false + firstSync:false }) }else{ this.setState({ @@ -227,7 +227,7 @@ class Detail extends Component { }else{ this.getDetail(); this.setState({ - firsrtSync:false, + firstSync:false, secondSync:false }) } @@ -248,7 +248,7 @@ class Detail extends Component { var cable = actioncable.createConsumer(`wss://${name}/cable`); this.canvasChannel1 = cable.subscriptions.create({ channel: `MirrorProjectChannel`, - id: project && project.identifier + id: project && project.id }, { connected: () => { console.log("###### channel connected! ######"); @@ -258,6 +258,10 @@ class Detail extends Component { console.log(`###### ---received data--- ######`); if (data) { this.getDetail(); + this.setState({ + firstSync:false, + secondSync:false + }); cable.subscriptions.consumer.disconnect(); } }