Skip to content

Commit

Permalink
refactor: apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 12, 2022
1 parent dd7448b commit 7b88dff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/logger.ts
Expand Up @@ -164,7 +164,7 @@ export function printCommonServerUrls(
}
}

const loopbackHosts = new Set<string | undefined>([
const loopbackHosts = new Set([
'localhost',
'127.0.0.1',
'::1',
Expand All @@ -180,7 +180,7 @@ function printServerUrls(
): void {
const urls: Array<{ label: string; url: string }> = []

if (loopbackHosts.has(hostname.host)) {
if (hostname.host && loopbackHosts.has(hostname.host)) {
let hostnameName = hostname.name
if (
hostnameName === '::1' ||
Expand Down

0 comments on commit 7b88dff

Please sign in to comment.