From 6b49a7676ce939b153d6ac5d7e9f1b799068a5ea Mon Sep 17 00:00:00 2001 From: Adrien Chauve Date: Tue, 12 Dec 2023 17:53:59 +0100 Subject: [PATCH] fix: fix prisma --- formulaire/src/lib/prismaClient.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/formulaire/src/lib/prismaClient.ts b/formulaire/src/lib/prismaClient.ts index eafac61e8..88f459d1e 100644 --- a/formulaire/src/lib/prismaClient.ts +++ b/formulaire/src/lib/prismaClient.ts @@ -9,14 +9,10 @@ declare global { } const getClient = () => { - if (process.env.NODE_ENV === "production") { - return new PrismaClient(); - } else { - if (!global.prisma) global.prisma = new PrismaClient(); - return global.prisma; - } + return new PrismaClient(); }; const client = getClient(); +global.prisma = client; export default client;