Skip to content

Commit e4739a9

Browse files
committed
fix(web): add optional chaining for session in billing identify
1 parent 2c1db8a commit e4739a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/web/src/app/api/autumn/[...all]/identify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function identify(request: Request) {
1919
if (!session?.user) return null
2020

2121
// Billing is per-org — use activeOrganizationId to match backend billing checks
22-
const customerId = session.session.activeOrganizationId ?? session.user.id
22+
const customerId = session.session?.activeOrganizationId ?? session.user.id
2323
return {
2424
customerId,
2525
customerData: {

0 commit comments

Comments
 (0)