From d1bbbc1bf1ee9c3a8517b8101ae661a34e5f7c27 Mon Sep 17 00:00:00 2001 From: Alexandre Bourdin Date: Mon, 15 May 2023 18:11:00 +0300 Subject: [PATCH] Merge pull request #13073 from overleaf/ab-inr-test-fix [web] Add missing optional when checking INR test assignment GitOrigin-RevId: a33e4f986ed017f3dc2b3fa025c6f9427b126ee8 --- .../app/src/Features/Subscription/SubscriptionController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 326bdcc24d..0a4cc2ee5f 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -834,13 +834,13 @@ async function _getRecommendedCurrency(req, res) { } // if the user has been detected as located in India (thus recommended INR as currency) // but is not part of the geo pricing test, we fall back to the default currency instead - if (recommendedCurrency === 'INR' && assignment.variant !== 'inr') { + if (recommendedCurrency === 'INR' && assignment?.variant !== 'inr') { recommendedCurrency = GeoIpLookup.DEFAULT_CURRENCY_CODE } return { recommendedCurrency, countryCode, - geoPricingTestVariant: assignment.variant, + geoPricingTestVariant: assignment?.variant, } }