Skip to content

Commit 6019957

Browse files
committed
fix(run-store): avoid Array.at in waitpoint count
1 parent 4d6e224 commit 6019957

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal-packages/run-store/src/PostgresRunStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,7 @@ export class PostgresRunStore implements RunStore {
20942094
WHERE id = ANY(${waitpointIds}::text[])
20952095
AND status = 'PENDING'
20962096
`;
2097-
return Number(pendingCheck.at(0)?.pending_count ?? 0);
2097+
return Number(pendingCheck[0]?.pending_count ?? 0);
20982098
}
20992099

21002100
const pendingCheck = await prisma.$queryRaw<{ pending_count: bigint }[]>`
@@ -2103,7 +2103,7 @@ export class PostgresRunStore implements RunStore {
21032103
WHERE id IN (${Prisma.join(waitpointIds)})
21042104
AND status = 'PENDING'
21052105
`;
2106-
return Number(pendingCheck.at(0)?.pending_count ?? 0);
2106+
return Number(pendingCheck[0]?.pending_count ?? 0);
21072107
}
21082108

21092109
async createWaitpoint<T extends Prisma.WaitpointCreateArgs>(

0 commit comments

Comments
 (0)