Skip to content

Commit ff9662b

Browse files
committed
fix: id
1 parent d247b57 commit ff9662b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/stripe.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const manageSubscriptionStatusChange = async (
8383
where: { id: customerId },
8484
});
8585

86-
invariant(customer, "Customer lookup failed");
86+
invariant(customer?.id, "Customer lookup failed");
8787

8888
const subscription = await stripe.subscriptions.retrieve(subscriptionId, {
8989
expand: ["default_payment_method"],
@@ -96,7 +96,7 @@ export const manageSubscriptionStatusChange = async (
9696
const id = subscription.id;
9797

9898
const data = {
99-
customerId: customer?.id,
99+
customerId: customer.id,
100100
metadata: subscription.metadata,
101101
status: subscription.status,
102102
priceId: item.price.id,

0 commit comments

Comments
 (0)