retryAndRefresh

dev_forum
hjm 5 years ago
parent d6ff838b0c
commit 7dd4d74b46

@ -236,6 +236,9 @@ class MainContentContainer extends Component {
// arg_path 点击文件目录树时传入的点击节点对应的path
fetchRepositoryCode( props, arg_path, type, isRetry, retryAndRefresh) {
if (retryAndRefresh) {
this.retryAndRefresh = retryAndRefresh
}
const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props;
if (shixun.vnc == true) {
// vnc模式下不需要加载代码
@ -294,7 +297,7 @@ class MainContentContainer extends Component {
// })
}).then((fetchRepositoryCodeResponse) => {
// monaca 需要刷新,不然无法编辑
if (retryAndRefresh && fetchRepositoryCodeResponse.data.content) {
if (this.retryAndRefresh && fetchRepositoryCodeResponse.data.content) {
window.location.reload()
return;
}

Loading…
Cancel
Save