mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
allow subscribers to buy their final monthly gem (#10331)
This commit is contained in:
@@ -49,7 +49,7 @@ export class BuyGemOperation extends AbstractGoldItemOperation {
|
|||||||
throw new NotAuthorized(this.i18n('reachedGoldToGemCap', {convCap: this.convCap}));
|
throw new NotAuthorized(this.i18n('reachedGoldToGemCap', {convCap: this.convCap}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.purchased.plan.gemsBought + this.quantity >= this.convCap) {
|
if (user.purchased.plan.gemsBought + this.quantity > this.convCap) {
|
||||||
throw new NotAuthorized(this.i18n('reachedGoldToGemCapQuantity', {
|
throw new NotAuthorized(this.i18n('reachedGoldToGemCapQuantity', {
|
||||||
convCap: this.convCap,
|
convCap: this.convCap,
|
||||||
quantity: this.quantity,
|
quantity: this.quantity,
|
||||||
|
|||||||
Reference in New Issue
Block a user