Skip to content

Commit

Permalink
Fix bundling errors being swallowed
Browse files Browse the repository at this point in the history
Fixes #266
  • Loading branch information
pmowrer committed Sep 14, 2015
1 parent 37d0e57 commit 9ddf430
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ function watchify (b, opts) {
});
b.on('bundle', function (bundle) {
updating = true;
bundle.on('error', onend);
bundle.on('error', function(err) {
b.emit('error', err);
onend();
});
bundle.on('end', onend);
function onend () { updating = false }
function onend () { updating = false; }
});

function watchFile (file, dep) {
Expand Down

0 comments on commit 9ddf430

Please sign in to comment.