Empty question fix

This commit is contained in:
mrfry 2021-01-14 17:10:30 +01:00
parent 09a04c4ae7
commit b5d5f20b79
6 changed files with 284 additions and 31 deletions

View file

@ -126,7 +126,9 @@ function compareString(string1: string, string2: string) {
}
function answerPreProcessor(value: string) {
assert(value)
if (!value) {
return value
}
return removeStuff(value, commonUselessAnswerParts)
}
@ -208,7 +210,7 @@ function createQuestion(
): Question {
return {
Q: simplifyQuestion(question),
A: answer ? simplifyAnswer(answer) : null,
A: answer ? simplifyAnswer(answer) : undefined,
data: data,
}
}