From 125704fba519b8f1c262bbfd16b836646a3ebb81 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 2 Jun 2025 16:01:48 +0530 Subject: [PATCH] update: flip `localStorage` check after `browser` check. --- src/lib/stores/billing.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/stores/billing.ts b/src/lib/stores/billing.ts index c99e18f64..f1101dd8b 100644 --- a/src/lib/stores/billing.ts +++ b/src/lib/stores/billing.ts @@ -492,12 +492,12 @@ export async function checkForMissingPaymentMethod() { // Display upgrade banner for new users after 1 week for 30 days export async function checkForNewDevUpgradePro(org: Organization) { - // already dismissed by user! - if (localStorage.getItem('newDevUpgradePro')) return; - // browser or plan check. if (!browser || org?.billingPlan !== BillingPlan.FREE) return; + // already dismissed by user! + if (localStorage.getItem('newDevUpgradePro')) return; + // saves one trip to backend! const notValidKey = `${org.$id}:isNotValid`; if (localStorage.getItem(notValidKey)) return;