Skip to content

Commit 8b8e042

Browse files
committed
refactor: code
1 parent 8290ae5 commit 8b8e042

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Server.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,17 +538,17 @@ class Server {
538538
});
539539
}
540540

541-
runBonjour(options) {
541+
runBonjour() {
542542
const bonjour = require('bonjour')();
543543
const os = require('os');
544-
const { https, port } = options;
544+
const { https, port } = this.options;
545545

546546
bonjour.publish({
547547
name: `Webpack Dev Server ${os.hostname()}:${port}`,
548548
port,
549549
type: https ? 'https' : 'http',
550550
subtypes: ['webpack'],
551-
...options.bonjour,
551+
...this.options.bonjour,
552552
});
553553

554554
process.on('exit', () => {
@@ -606,7 +606,7 @@ class Server {
606606
openTasks.push(...getOpenTask(options));
607607
}
608608

609-
return Promise.all(
609+
Promise.all(
610610
openTasks.map((openTask) => {
611611
let openTarget;
612612

@@ -825,7 +825,7 @@ class Server {
825825
}
826826

827827
if (this.options.bonjour) {
828-
this.runBonjour(this.options);
828+
this.runBonjour();
829829
}
830830

831831
this.logStatus();

0 commit comments

Comments
 (0)