From 5d1960ab8f5bb94552ceee26514b1516a71d524d Mon Sep 17 00:00:00 2001 From: Julien Genestoux Date: Wed, 28 Aug 2024 15:24:21 -0400 Subject: [PATCH] fix(unlock-js): fixing approvals --- .../unlock-js/src/PublicLock/v10/getPurchaseKeysArguments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/unlock-js/src/PublicLock/v10/getPurchaseKeysArguments.js b/packages/unlock-js/src/PublicLock/v10/getPurchaseKeysArguments.js index 827795fd50c..c1f9382aae5 100644 --- a/packages/unlock-js/src/PublicLock/v10/getPurchaseKeysArguments.js +++ b/packages/unlock-js/src/PublicLock/v10/getPurchaseKeysArguments.js @@ -80,7 +80,7 @@ export default async function getPurchaseKeysArguments({ totalAmountToApprove = keyPrices .map((keyPrice, i) => { if (keyPrice > 0) { - const recurringPayment = recurringPayments[i] + const recurringPayment = recurringPayments && recurringPayments[i] if (!recurringPayment) { return keyPrice } else if (recurringPayment === Infinity) {