We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6f456b + 41be103 commit 22444d5Copy full SHA for 22444d5
src/adapter.ts
@@ -9,13 +9,11 @@ export class PrismaAdapter implements Adapter {
9
#option?: Prisma.PrismaClientOptions;
10
#prisma: PrismaClient;
11
12
- constructor(
13
- option?: Prisma.PrismaClientOptions,
14
- prismaClient?: PrismaClient
15
- ) {
16
- this.#option = option;
17
- if (prismaClient) {
18
- this.#prisma = prismaClient;
+ constructor(option?: Prisma.PrismaClientOptions | PrismaClient) {
+ if (option instanceof PrismaClient) {
+ this.#prisma = option;
+ } else {
+ this.#option = option;
19
}
20
21
0 commit comments