🎨(frontend) replace logical OR with nullish coalescing operator

Replace `||` operators and conditional checks with `??` where appropriate
for safer null/undefined handling. Nullish coalescing only triggers for
null/undefined values, preventing unexpected behavior with falsy values
like 0 or empty strings.
This commit is contained in:
lebaudantoine
2025-06-30 18:02:45 +02:00
committed by aleb_the_flash
parent b265c3c7cb
commit b058e6add9
8 changed files with 9 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ export default defineConfig(({ mode }) => {
plugins: [react(), tsconfigPaths()],
server: {
port: parseInt(env.VITE_PORT) || 3000,
host: env.VITE_HOST || 'localhost',
host: env.VITE_HOST ?? 'localhost',
allowedHosts: ['.nip.io'],
},
}