fix(kb.gbapp): Skips blank answers lines.
This commit is contained in:
parent
bd20312bad
commit
46fb4244c7
1 changed files with 7 additions and 1 deletions
|
@ -475,7 +475,7 @@ export class KBService implements IGBKBService {
|
|||
// TODO: Convert DOCX to MD.
|
||||
|
||||
answer = Fs.readFileSync(mediaFilename, 'utf8');
|
||||
|
||||
|
||||
format = '.md';
|
||||
media = path.basename(mediaFilename);
|
||||
} else {
|
||||
|
@ -506,6 +506,12 @@ export class KBService implements IGBKBService {
|
|||
indexer++;
|
||||
});
|
||||
|
||||
// Skips blank answers.
|
||||
|
||||
if (answer && answer.length < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now with all the data ready, creates entities in the store.
|
||||
|
||||
const answer1 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue