From 8a542f38e74003a5f94c8dd42d727b2f5cc51ab1 Mon Sep 17 00:00:00 2001 From: Jonathan Barrow Date: Tue, 20 Sep 2022 19:40:11 -0400 Subject: [PATCH] Look for products default price --- src/routes/account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/account.js b/src/routes/account.js index fb5f8df..8af363f 100644 --- a/src/routes/account.js +++ b/src/routes/account.js @@ -291,7 +291,7 @@ router.get('/upgrade', requireLoginMiddleware, async (request, response) => { .filter(product => product.active) .sort((a, b) => +a.metadata.tier_level - +b.metadata.tier_level) .map(product => { - const price = prices.find(price => price.product === product.id); + const price = prices.find(price => price.id === product.default_price); const perks = []; if (product.metadata.discord_read === 'true') {