|
@@ -482,7 +482,7 @@ export const useExam = () => {
|
|
|
answer1 = answer1 || '';
|
|
answer1 = answer1 || '';
|
|
|
answer2 = answer2 || '';
|
|
answer2 = answer2 || '';
|
|
|
if ([EnumQuestionType.SINGLE_CHOICE, EnumQuestionType.JUDGMENT].includes(typeId)) {
|
|
if ([EnumQuestionType.SINGLE_CHOICE, EnumQuestionType.JUDGMENT].includes(typeId)) {
|
|
|
- return answer1.trim() === answers[0];
|
|
|
|
|
|
|
+ return answer1?.trim() === answers[0];
|
|
|
} else if ([EnumQuestionType.MULTIPLE_CHOICE].includes(typeId)) {
|
|
} else if ([EnumQuestionType.MULTIPLE_CHOICE].includes(typeId)) {
|
|
|
return answers.length === answer1.length && answers.every(item => answer1.includes(item));
|
|
return answers.length === answer1.length && answers.every(item => answer1.includes(item));
|
|
|
} else {
|
|
} else {
|