🎨 prod flag import
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { PrismaClient, Document, User } from "@prisma/client";
|
||||
import { isENVProd } from "@documenso/lib"
|
||||
|
||||
declare global {
|
||||
var client: PrismaClient | undefined;
|
||||
@@ -8,7 +9,7 @@ declare global {
|
||||
const prisma = globalThis.client || new PrismaClient();
|
||||
|
||||
// Save for reuse in dev environment to avoid many client instances in dev where restart and reloads
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (!isENVProd) {
|
||||
globalThis.client = prisma;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user