Skip to content

Commit 436cdc7

Browse files
committed
Refactoring
1 parent ddb40e5 commit 436cdc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
120120
const isAddressInfo = (x: string|AddressInfo|null|undefined): x is AddressInfo => typeof x === 'object'
121121
if (isAddressInfo(address)) {
122122
const protocol = server.config.server.https ? 'https' : 'http'
123-
const configHost = typeof server.config.server.host === 'string' ? server.config.server.host : false
123+
const configHost = typeof server.config.server.host === 'string' ? server.config.server.host : null
124124
const serverAddress = address.family === 'IPv6' ? `[${address.address}]` : address.address
125-
const host = configHost || serverAddress
125+
const host = configHost ?? serverAddress
126126
viteDevServerUrl = `${protocol}://${host}:${address.port}`
127127
fs.writeFileSync(hotFile, viteDevServerUrl)
128128

0 commit comments

Comments
 (0)