Skip to content

Commit 0e852e3

Browse files
Deniz Ozgerfengmk2
authored andcommitted
docs: ignore type of port when checking if it's occupied (#18)
This fixes errors like "Port 3000 is occupied, try port: 3000".
1 parent bd4593f commit 0e852e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ detect(port, (err, _port) => {
3838
console.log(err);
3939
}
4040

41-
if (port === _port) {
41+
if (port == _port) {
4242
console.log(`port: ${port} was not occupied`);
4343
} else {
4444
console.log(`port: ${port} was occupied, try port: ${_port}`);
@@ -54,7 +54,7 @@ const co = require('co');
5454
co(function *() {
5555
const _port = yield detect(port);
5656

57-
if (port === _port) {
57+
if (port == _port) {
5858
console.log(`port: ${port} was not occupied`);
5959
} else {
6060
console.log(`port: ${port} was occupied, try port: ${_port}`);
@@ -67,7 +67,7 @@ co(function *() {
6767

6868
detect(port)
6969
.then(_port => {
70-
if (port === _port) {
70+
if (port == _port) {
7171
console.log(`port: ${port} was not occupied`);
7272
} else {
7373
console.log(`port: ${port} was occupied, try port: ${_port}`);

0 commit comments

Comments
 (0)