diff --git a/public/react/src/modules/modals/Bottomsubmit.js b/public/react/src/modules/modals/Bottomsubmit.js index 187910cb9..22fb7c8fd 100644 --- a/public/react/src/modules/modals/Bottomsubmit.js +++ b/public/react/src/modules/modals/Bottomsubmit.js @@ -12,9 +12,13 @@ class Bottomsubmit extends Component { cannelfun = () => { // window.location.href= - if(this.props.Cohetepaperbool===true){ - this.props.setCohetepaperbool(false); - }else { + try { + if(this.props.Cohetepaperbool===true){ + this.props.setCohetepaperbool(false); + }else { + this.props.history.replace(this.props.url); + } + }catch (e) { this.props.history.replace(this.props.url); } diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index f40ad9519..fadba71ca 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -463,6 +463,7 @@ class Paperreview extends Component { this.setCohetepaperbool(bool)} + Cohetepaperbool={this.state.Cohetepaperbool} onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/problemset':'/paperlibrary'}> )