Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

check user exists before making purchase

ammarahm-ed9bebe5595a96
diff --git a/apps/mobile/src/components/Premium/pricingplans.js b/apps/mobile/src/components/Premium/pricingplans.js
index 540975057..38c8d7711 100644
--- a/apps/mobile/src/components/Premium/pricingplans.js
+++ b/apps/mobile/src/components/Premium/pricingplans.js
@@ -108,6 +108,10 @@ export const PricingPlans = ({
if (buying) return;
setBuying(true);
try {
+ if (!user) {
+ setBuying(false);
+ return;
+ }
await RNIap.requestSubscription(
product?.productId,
false,