Skip to content

Commit

Permalink
Merge pull request #604 from tone-row/dev
Browse files Browse the repository at this point in the history
v1.40.3
  • Loading branch information
rob-gordon authored Sep 15, 2023
2 parents cc58737 + f6fc97e commit add4bf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions api/customer-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export default async function customerInfo(
return validStripePrices.includes(priceId);
});

// Sort active subscriptions to the top
validSubscriptions.sort((a, b) => {
if (a.status === "active") return -1;
if (b.status === "active") return 1;
return 0;
});

const subscription = validSubscriptions.length
? validSubscriptions[0]
: undefined;
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "1.40.2",
"version": "1.40.3",
"main": "module/module.js",
"license": "MIT",
"scripts": {
Expand Down

1 comment on commit add4bf1

@vercel
Copy link

@vercel vercel bot commented on add4bf1 Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.