Check extracted is an instance of TranslationCollection before merging
This commit is contained in:
parent
096fc79a9b
commit
16bf5f59e0
@ -107,7 +107,7 @@ export class ExtractTask implements TaskInterface {
|
|||||||
const contents: string = fs.readFileSync(path, 'utf-8');
|
const contents: string = fs.readFileSync(path, 'utf-8');
|
||||||
this.parsers.forEach(parser => {
|
this.parsers.forEach(parser => {
|
||||||
const extracted = parser.extract(contents, path);
|
const extracted = parser.extract(contents, path);
|
||||||
if (extracted) {
|
if (extracted instanceof TranslationCollection) {
|
||||||
collection = collection.union(extracted);
|
collection = collection.union(extracted);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user