Skip to content

Commit 6d382bd

Browse files
committed
fix: auto logic
1 parent cbc6d3f commit 6d382bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,10 @@ class Server {
772772
);
773773
}
774774

775+
const shouldFindPort = this.options.port === 'auto';
776+
const initialPort = shouldFindPort ? null : port || this.options.port;
775777
return (
776-
findPort(port || this.options.port)
778+
findPort(initialPort)
777779
// eslint-disable-next-line no-shadow
778780
.then((port) => {
779781
this.options.port = port;

0 commit comments

Comments
 (0)