Skip to content

Commit 0221aed

Browse files
committed
fix tests
1 parent a8575f9 commit 0221aed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/backend/src/lib/payments.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ export async function getSubscriptions(options: {
331331

332332
const productLinesWithDbSubscriptions = new Set<string>();
333333
for (const s of dbSubscriptions) {
334-
const product = s.product as yup.InferType<typeof productSchema> | undefined;
334+
let product = s.product as yup.InferType<typeof productSchema> | undefined;
335+
if (!product) {
336+
product = s.productId ? getOrUndefined(products, s.productId) : undefined;
337+
}
335338
if (!product) continue;
336339
subscriptions.push({
337340
id: s.id,

0 commit comments

Comments
 (0)