diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index b84bf4794..419fd8f5f 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -1803,17 +1803,22 @@ class PollNew extends Component { var urlly = `/polls/${poll_id}/poll_questions.json` var max_choicess = null; var min_choicess = null; - if (max_choices === 0 && min_choices === 0) { + try { + if (max_choices === 0 && min_choices === 0) { + max_choicess = null; + min_choicess = null; + } else { + max_choicess = max_choices; + min_choicess = min_choices; + } + }catch (e) { max_choicess = null; min_choicess = null; - } else { - max_choicess = max_choices; - min_choicess = min_choices; } - console.log("createquestionsandanswers"); - console.log(max_choicess); - console.log(min_choicess); - console.log(length); + // console.log("createquestionsandanswers"); + // console.log(max_choicess); + // console.log(min_choicess); + // console.log(length); axios.post(urlly, { question_title: object.question.question_title, question_type: number, @@ -1856,13 +1861,19 @@ class PollNew extends Component { var thiss = this; var max_choicess = null; var min_choicess = null; - if (max_choices === 0 && min_choices === 0) { + try { + if (max_choices === 0 && min_choices === 0) { + max_choicess = null; + min_choicess = null; + } else { + max_choicess = max_choices; + min_choicess = min_choices; + } + }catch (e) { max_choicess = null; min_choicess = null; - } else { - max_choicess = max_choices; - min_choicess = min_choices; } + console.log("createquestionsandanswers"); console.log(max_choicess); console.log(min_choicess);