diff --git a/.gitignore b/.gitignore index 56e9332..05104ca 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ npm-debug.log coverage node_modules .eslintcache +.idea test/**/output* output.js diff --git a/lib/routes.js b/lib/routes.js index d7001dd..46de04c 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -46,8 +46,9 @@ const setupRoutes = function setupRoutes() { socket.lastHash = hash; const { errors = [], warnings = [] } = stats.toJson(statsOptions); + const hasErrors = Boolean(errors.length); - if (errors.length || warnings.length) { + if (hasErrors || warnings.length) { socket.send( prep({ action: 'problems', @@ -60,7 +61,7 @@ const setupRoutes = function setupRoutes() { }) ); - return; + if (hasErrors) return; } if (options.hmr || options.liveReload) {