fix lint errors

This commit is contained in:
Phillip Thelen
2022-10-28 12:41:43 +02:00
committed by Phillip Thelen
parent f07d0f6441
commit 777f7887b4
@@ -74,8 +74,15 @@ async function prepareSubscriptionValues (data) {
? data.gift.subscription.key
: data.sub.key];
const autoRenews = data.autoRenews !== undefined ? data.autoRenews : true;
const updatedFrom = data.updatedFrom ? shared.content.subscriptionBlocks[data.updatedFrom.key] : undefined;
const months = updatedFrom && Number(updatedFrom.months) !== 1 ? Math.max(0, Number(block.months) - Number(updatedFrom.months)) : Number(block.months);
const updatedFrom = data.updatedFrom
? shared.content.subscriptionBlocks[data.updatedFrom.key]
: undefined;
let months;
if (updatedFrom && Number(updatedFrom.months) !== 1) {
months = Math.max(0, Number(block.months) - Number(updatedFrom.months));
} else {
months = Number(block.months);
}
const today = new Date();
let group;
let groupId;