紧急修复镜像bug

This commit is contained in:
何童崇 2021-08-18 14:38:11 +08:00
parent 3294d99516
commit 6e74f88d9e
1 changed files with 7 additions and 3 deletions

View File

@ -215,7 +215,7 @@ class Detail extends Component {
if(num){
this.setState({
secondSync:true,
firsrtSync:false
firstSync:false
})
}else{
this.setState({
@ -226,7 +226,7 @@ class Detail extends Component {
}else{
this.getDetail();
this.setState({
firsrtSync:false,
firstSync:false,
secondSync:false
})
}
@ -247,7 +247,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! ######");
@ -257,6 +257,10 @@ class Detail extends Component {
console.log(`###### ---received data--- ######`);
if (data) {
this.getDetail();
this.setState({
firstSync:false,
secondSync:false
});
cable.subscriptions.consumer.disconnect();
}
}