Skip to content

Commit ddc1e2c

Browse files
birdwellshellscape
authored andcommitted
fixes #1217: edge case with default watchOptions value (#1218)
There is a problem when watchOptions is set to undefined in the options object. this.watchOptions is then set to undefined. We want an empty object so we can check poll property later.
1 parent 2719590 commit ddc1e2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function Server(compiler, options) {
5050
this.allowedHosts = options.allowedHosts;
5151
this.sockets = [];
5252
this.contentBaseWatchers = [];
53-
this.watchOptions = options.watchOptions;
53+
this.watchOptions = options.watchOptions || {};
5454

5555
// Listening for events
5656
const invalidPlugin = () => {

0 commit comments

Comments
 (0)