From 763adbdf8bdf93a307eb238b527e129fc50045a9 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Mon, 8 Jun 2026 15:03:55 +0200 Subject: [PATCH] fix --- website/server/libs/payments/google.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/website/server/libs/payments/google.js b/website/server/libs/payments/google.js index b9ad6e8a3b..35806bd6e9 100644 --- a/website/server/libs/payments/google.js +++ b/website/server/libs/payments/google.js @@ -180,9 +180,12 @@ api.subscribe = async function subscribe ( if (!isValidated) throw new NotAuthorized(this.constants.RESPONSE_INVALID_RECEIPT); let nextPaymentProcessing = moment.utc().add({ days: 2 }); // eslint-disable-line no-param-reassign, max-len - const nextBillingDate = new Date(Number(googleRes.expirationDate)); - if (nextBillingDate < nextPaymentProcessing.toDate()) { - nextPaymentProcessing = moment(nextBillingDate); + let nextBillingDate; + if (googleRes.expirationDate) { + nextBillingDate = new Date(Number(googleRes.expirationDate)); + if (nextBillingDate < nextPaymentProcessing.toDate()) { + nextPaymentProcessing = moment(nextBillingDate); + } } const data = { user,