Skip to content

Commit

Permalink
fix(kb.gbapp): Skips blank answers lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Aug 26, 2022
1 parent bd20312 commit 46fb424
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/kb.gbapp/services/KBService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 46fb424

Please sign in to comment.