File tree 2 files changed +3
-3
lines changed
packages/@vuepress/core/lib/node
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ module.exports = class App {
451
451
* @api public
452
452
*/
453
453
454
- async dev ( ) {
454
+ async dev ( callback ) {
455
455
this . isProd = false
456
456
this . devProcess = new DevProcess ( this )
457
457
await this . devProcess . process ( )
@@ -462,7 +462,7 @@ module.exports = class App {
462
462
this . process ( )
463
463
} )
464
464
. createServer ( )
465
- . listen ( )
465
+ . listen ( callback )
466
466
}
467
467
468
468
/**
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ module.exports = class DevProcess extends EventEmitter {
250
250
251
251
listen ( callback ) {
252
252
this . server . listen ( this . port , this . host , ( err ) => {
253
- if ( callback ) {
253
+ if ( typeof callback === 'function' ) {
254
254
callback ( err )
255
255
}
256
256
} )
You can’t perform that action at this time.
0 commit comments