Skip to content

Commit

Permalink
Merge pull request #5 from steven-haddix/error-handling
Browse files Browse the repository at this point in the history
Added done call to error handling so plugin properly returns errors…
  • Loading branch information
steven-haddix authored Dec 29, 2016
2 parents 8afc041 + bc777ce commit 2728a31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ SuperAwesomeWebpackPlugin.prototype.apply = function(compiler) {

Promise.all(sitePromises)
.then(() => done())
.catch((err) => compilation.errors.push(err.stack))
.catch((err) =>{
compilation.errors.push(err.stack)
done();
})
} catch (err) {
compilation.errors.push(err.stack);
done();
Expand Down

0 comments on commit 2728a31

Please sign in to comment.