Skip to content

Commit

Permalink
chore(utils): remove redundant type judgment (#12345)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed Mar 9, 2023
1 parent 0f6de4d commit 01a0056
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,9 @@ export async function resolveServerUrls(
(detail) =>
detail &&
detail.address &&
((typeof detail.family === 'string' && detail.family === 'IPv4') ||
(detail.family === 'IPv4' ||
// @ts-expect-error Node 18.0 - 18.3 returns number
(typeof detail.family === 'number' && detail.family === 4)),
detail.family === 4),
)
.forEach((detail) => {
let host = detail.address.replace('127.0.0.1', hostname.name)
Expand Down

0 comments on commit 01a0056

Please sign in to comment.