mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Empty question fix
This commit is contained in:
parent
09a04c4ae7
commit
b5d5f20b79
6 changed files with 284 additions and 31 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue