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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user