Skip to content

Commit 212c088

Browse files
committed
refactor: code
1 parent 2a0fd29 commit 212c088

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ class Server {
558558
});
559559
}
560560

561-
static runOpen(uri, options, logger) {
561+
runOpen(uri, options) {
562562
const isAbsoluteUrl = require('is-absolute-url');
563563
const open = require('open');
564564

@@ -623,7 +623,7 @@ class Server {
623623
}
624624

625625
return open(openTarget, openTask.options).catch(() => {
626-
logger.warn(
626+
this.logger.warn(
627627
`Unable to open "${openTarget}" page${
628628
// eslint-disable-next-line no-nested-ternary
629629
openTask.options.app
@@ -766,7 +766,7 @@ class Server {
766766
if (this.options.open) {
767767
const openTarget = prettyPrintUrl(this.options.host || 'localhost');
768768

769-
Server.runOpen(openTarget, this.options.open, this.logger);
769+
this.runOpen(openTarget, this.options.open);
770770
}
771771
}
772772

0 commit comments

Comments
 (0)