From 16bf5f59e0ed62ec61bad0eabb6078f1566f4fa4 Mon Sep 17 00:00:00 2001 From: Kim Biesbjerg Date: Tue, 17 Sep 2019 14:15:21 +0200 Subject: [PATCH] Check extracted is an instance of TranslationCollection before merging --- src/cli/tasks/extract.task.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/tasks/extract.task.ts b/src/cli/tasks/extract.task.ts index e7a2219..1e73c11 100644 --- a/src/cli/tasks/extract.task.ts +++ b/src/cli/tasks/extract.task.ts @@ -107,7 +107,7 @@ export class ExtractTask implements TaskInterface { const contents: string = fs.readFileSync(path, 'utf-8'); this.parsers.forEach(parser => { const extracted = parser.extract(contents, path); - if (extracted) { + if (extracted instanceof TranslationCollection) { collection = collection.union(extracted); } });