We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adb4e59 commit 7a7b42aCopy full SHA for 7a7b42a
app/config/db.js
@@ -1,7 +1,7 @@
1
import { PrismaClient } from '@prisma/client'
2
3
// Prevent multiple instances in development
4
-const globalForPrisma = global as unknown as { prisma: PrismaClient }
+const globalForPrisma = global || {}
5
6
const prisma = globalForPrisma.prisma || new PrismaClient({
7
log: ['query', 'error', 'warn'],
0 commit comments