mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
add question fix
This commit is contained in:
parent
1a76ca2536
commit
347952c6da
2 changed files with 51 additions and 3 deletions
|
@ -460,10 +460,10 @@ function addQuestion(
|
|||
logger.DebugLog('Adding new question with subjName: ' + subj, 'qdb add', 1)
|
||||
logger.DebugLog(question, 'qdb add', 3)
|
||||
|
||||
const i = data.findIndex((x) => {
|
||||
return !subj
|
||||
const i = data.findIndex((subject) => {
|
||||
return subj
|
||||
.toLowerCase()
|
||||
.includes(getSubjNameWithoutYear(x.Name).toLowerCase())
|
||||
.includes(getSubjNameWithoutYear(subject.Name).toLowerCase())
|
||||
})
|
||||
|
||||
if (i !== -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue