Commit c957cc53 authored by Lukas Eipert's avatar Lukas Eipert

Fix incremental webpack mode without live_reload

If `live_reload` is disabled, we accidentally kill the webpack dev
server because `devServer.webSocketServer.clients` is undefined, because
we are checking the wrong condition. This fixes the condition check.
parent 7996a03e
...@@ -102,7 +102,7 @@ class IncrementalWebpackCompiler { ...@@ -102,7 +102,7 @@ class IncrementalWebpackCompiler {
setTimeout(() => { setTimeout(() => {
devServer.invalidate(() => { devServer.invalidate(() => {
if (devServer.sockets) { if (Array.isArray(devServer.webSocketServer && devServer.webSocketServer.clients)) {
devServer.sendMessage(devServer.webSocketServer.clients, 'static-changed'); devServer.sendMessage(devServer.webSocketServer.clients, 'static-changed');
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment