切换关卡

dev_unstable
hjm 5 years ago
parent 26b78bcfb3
commit b7634406e9

@ -224,13 +224,15 @@ class MainContentContainer extends Component {
}
componentDidUpdate(prevProps, prevState, snapshot) {
const { game } = this.props
const { game, challenge } = this.props
if (game && prevProps.game
&& prevProps.game.identifier !== game.identifier) {
// 切换关卡时,停止轮训
this.oldGameIdentifier = prevProps.game.identifier;
this.doFileUpdateRequestOnCodeMirrorBlur(prevProps)
} else if (challenge && (challenge.pathIndex || prevProps.challenge.pathIndex) && challenge.pathIndex != prevProps.challenge.pathIndex) {
this.doFileUpdateRequestOnCodeMirrorBlur(prevProps)
}
}

Loading…
Cancel
Save