Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined local network address #572

Merged
merged 1 commit into from Mar 2, 2021
Merged

Conversation

wabscale
Copy link
Contributor

@wabscale wabscale commented Jan 6, 2020

In the event that serve is started when the host machine is not connected to the internet, the local network address will show up as undefined. Adding a simple check fixes this. When this is the case, the local network address won't appear anymore.

  • Fix undefined local network address

@leerob
Copy link
Member

leerob commented Mar 2, 2021

null is not an improvement over undefined here, so I'm going to close this as won't fix. Thank you regardless 🙏

@leerob leerob closed this Mar 2, 2021
@wabscale
Copy link
Contributor Author

wabscale commented Mar 2, 2021

If you read a few lines down, if networkAddress is null then it does not print it out. It does not print null.

https://github.com/vercel/serve/blob/master/bin/serve.js#L245

@wabscale
Copy link
Contributor Author

wabscale commented Mar 2, 2021

Here is how it looks right now in the master branch:

before

And here is what it looks like after my change:

after

@leerob leerob reopened this Mar 2, 2021
@leerob
Copy link
Member

leerob commented Mar 2, 2021

My apologies - I definitely read this wrong!

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@leerob leerob merged commit b71af1a into vercel:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants