🎨 prod flag import

This commit is contained in:
Timur Ercan
2023-03-09 13:17:44 +01:00
parent 7eaa21fc1e
commit 9c7c7d1a3c
3 changed files with 4 additions and 1 deletions

View File

@@ -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;
}