fix(kb.gbapp): Skips blank answers lines.
This commit is contained in:
parent
4922c448fa
commit
fa63a3eb6f
1 changed files with 5 additions and 4 deletions
|
@ -453,10 +453,11 @@ export class KBService implements IGBKBService {
|
||||||
const subjectsText = line._cells[0].text;
|
const subjectsText = line._cells[0].text;
|
||||||
const from = line._cells[1].text;
|
const from = line._cells[1].text;
|
||||||
const to = line._cells[2].text;
|
const to = line._cells[2].text;
|
||||||
const question = line._cells[3].text;
|
const question = line._cells[3].text.trim();
|
||||||
let answer = line._cells[4].text;
|
let answer = line._cells[4].text.trim();
|
||||||
|
|
||||||
if (!(subjectsText === 'subjects' && from === 'from') && answer !== null && question !== null) {
|
if (!(subjectsText === 'subjects' && from === 'from') && answer !== null && question !== null &&
|
||||||
|
answer !== '' && question !== '') {
|
||||||
let format = '.txt';
|
let format = '.txt';
|
||||||
|
|
||||||
// Extracts answer from external media if any.
|
// Extracts answer from external media if any.
|
||||||
|
@ -508,7 +509,7 @@ export class KBService implements IGBKBService {
|
||||||
|
|
||||||
// Skips blank answers.
|
// Skips blank answers.
|
||||||
|
|
||||||
if (answer && answer.length < 1) {
|
if (answer && answer.trim() === '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue