Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Jul 17, 2018
1 parent dba24d6 commit 45c41f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ParserFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ export class ParserFactory {
debug(`Lazy loading parser: ${moduleName}`);
if (options.loadParser) {
return options.loadParser(moduleName).then(parser => {
if(!parser) {
if (!parser) {
throw new Error(`options.loadParser failed to resolve module "${moduleName}".`);
}
return parser;
})
});
}
const module = require('./' + moduleName);
return Promise.resolve(new module.default());
Expand Down

0 comments on commit 45c41f6

Please sign in to comment.