We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e29d042 commit 35a7c45Copy full SHA for 35a7c45
packages/api/services/coa/issues/index.ts
@@ -3,11 +3,11 @@ import { prismaClient as prismaCoa } from "~prisma-schemas/schemas/coa/client";
3
import type { ExtraSelectField } from "~prisma-schemas/schemas/coa/extended";
4
5
export default {
6
- getIssues: (issuecodes: string[], withFields: ExtraSelectField[] = []) =>
+ getIssues: (issuecodes: string[], withFields: ExtraSelectField[]) =>
7
prismaCoa
8
.augmentIssueArrayWithInducksData(
9
issuecodes.map((issuecode) => ({ issuecode })),
10
- withFields.filter((field) => ["title", "fullyindexed"].includes(field)),
+ (withFields || []).filter((field) => ["title", "fullyindexed"].includes(field)),
11
)
12
.then((data) => data.groupBy("issuecode")),
13
0 commit comments