From 2308454f427f266269afac7d73fee69724ff470c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 8 Jul 2019 16:49:36 +0800 Subject: [PATCH 1/3] del --- .../react/src/modules/tpm/challengesnew/TPManswer2.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPManswer2.js b/public/react/src/modules/tpm/challengesnew/TPManswer2.js index 98c615065..b5e1b43a6 100644 --- a/public/react/src/modules/tpm/challengesnew/TPManswer2.js +++ b/public/react/src/modules/tpm/challengesnew/TPManswer2.js @@ -195,10 +195,10 @@ export default class TPManswer extends Component { this.setState({ answers: newAnswers}) } answerOnChange = (val, index) => { - // if (!this.state.answers[index]) { - // // 1、2、3删除2会走到这里 - // return; - // } + if (!this.state.answers[index]) { + // 1、2、3删除2会走到这里 + return; + } const newAnswer = Object.assign({}, this.state.answers[index]) newAnswer.contents = val const newAnswers = this.state.answers.slice(0) @@ -314,7 +314,7 @@ export default class TPManswer extends Component { { answers.map((answer, index) => { - return