Skip to content

Commit

Permalink
fix(prisma): fix long running prisma generate by updating inspected a…
Browse files Browse the repository at this point in the history
…rray before recursing hasModelInFields
  • Loading branch information
julianmills authored and Romakita committed Dec 15, 2022
1 parent b111130 commit d298a89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/orm/prisma/src/generator/utils/isCircularRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function hasModelInFields(model: DMMF.Model, relation: string, ctx: TransformCon
const nextModel = ctx.modelsMap.get(field.type);

if (nextModel) {
return hasModelInFields(nextModel, relation, ctx, [...inspected, field.type]);
inspected = [...inspected, field.type];
return hasModelInFields(nextModel, relation, ctx, inspected);
}
}

Expand Down

0 comments on commit d298a89

Please sign in to comment.