Skip to content

Commit 58204be

Browse files
committed
fix missing typedef check
1 parent 3c6a135 commit 58204be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schema/src/plugins/enhancer/enhance/auth-type-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function generateAuthType(model: Model, authDecl: DataModel | TypeDef) {
101101
${Array.from(types.entries())
102102
.map(([type, typeInfo]) => {
103103
// TypeDef types are generated in "json-types.ts" for the new "prisma-client" generator
104-
const typeRef = isNewGenerator ? `$TypeDefs.${type}` : `_P.${type}`;
104+
const typeRef = isNewGenerator && typeInfo.isTypeDef ? `$TypeDefs.${type}` : `_P.${type}`;
105105
let result = `Partial<${typeRef}>`;
106106
107107
if (type === authDecl.name) {

0 commit comments

Comments
 (0)