diff --git a/public/react/src/modules/courses/poll/PollNewQuestbank.js b/public/react/src/modules/courses/poll/PollNewQuestbank.js index c087e4f06..31742ba6d 100644 --- a/public/react/src/modules/courses/poll/PollNewQuestbank.js +++ b/public/react/src/modules/courses/poll/PollNewQuestbank.js @@ -539,14 +539,19 @@ class PollNewQuestbank extends Component { } answers.push(answerstwo); } - if(anserbool===false){ - let answersysltwo = { - "answer_id": parseInt(object.question.answers[object.question.answers.length-1].answer_id)+1, - "answer_position": parseInt(object.question.answers[object.question.answers.length-1].answer_position)+1, - "answer_text": "其他" + try { + if(anserbool===false){ + let answersysltwo = { + "answer_id": parseInt(object.question.answers[object.question.answers.length-1].answer_id)+1, + "answer_position": parseInt(object.question.answers[object.question.answers.length-1].answer_position)+1, + "answer_text": "其他" + } + answers.push(answersysltwo); } - answers.push(answersysltwo); + }catch (e) { + } + questiontwo = { "id": object.question.id, "is_necessary": object.question.is_necessary,