Skip to content

Commit 434f94b

Browse files
ibashSpaceK33z
authored andcommitted
Removing watching/watching.running check (#100)
Given that `state` should always have the correct value (if the bundle is valid or not) then we should be able to use ready directly without checking the watcher. I also hit a bug where the watcher had running set to false while the bundle was invalid, leading to a callback being executed immediately instead of waiting.
1 parent cd47fa3 commit 434f94b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

middleware.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ module.exports = function(compiler, options) {
265265

266266
webpackDevMiddleware.waitUntilValid = function(callback) {
267267
callback = callback || function() {};
268-
if(!watching || !watching.running) callback();
269-
else ready(callback, {});
268+
ready(callback, {});
270269
};
271270

272271
webpackDevMiddleware.invalidate = function(callback) {

0 commit comments

Comments
 (0)