We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8575f9 commit 0221aedCopy full SHA for 0221aed
1 file changed
apps/backend/src/lib/payments.tsx
@@ -331,7 +331,10 @@ export async function getSubscriptions(options: {
331
332
const productLinesWithDbSubscriptions = new Set<string>();
333
for (const s of dbSubscriptions) {
334
- const product = s.product as yup.InferType<typeof productSchema> | undefined;
+ let product = s.product as yup.InferType<typeof productSchema> | undefined;
335
+ if (!product) {
336
+ product = s.productId ? getOrUndefined(products, s.productId) : undefined;
337
+ }
338
if (!product) continue;
339
subscriptions.push({
340
id: s.id,
0 commit comments