🐛 env.port reporting NaN bug fix (#1375)

This commit is contained in:
Tagaishi
2023-09-07 21:35:28 +02:00
committed by GitHub
parent 3120949a7e
commit 7b2c0d63f3

View File

@@ -1,7 +1,7 @@
const { z } = require('zod');
const { createEnv } = require('@t3-oss/env-nextjs');
const portSchema = z.string().regex(/\d*/).transform((value) => value === undefined ? undefined : Number(Number)).optional();
const portSchema = z.string().regex(/\d*/).transform((value) => value === undefined ? undefined : Number(value)).optional();
const envSchema = z.enum(['development', 'test', 'production']);
const env = createEnv({