add a missing variable declaration

This commit is contained in:
Alys
2016-05-14 23:01:45 +10:00
parent 6acaef50e6
commit 210d01ddae

View File

@@ -41,6 +41,8 @@ function grantEndOfTheMonthPerks (user, now) {
function removeTerminatedSubscription (user) {
// If subscription's termination date has arrived
let plan = user.purchased.plan;
if (plan.dateTerminated && moment(plan.dateTerminated).isBefore(new Date())) {
_.merge(plan, {
planId: null,