mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 09:39:23 +00:00
fix(payments): short circuit for non-gift txns (#8881)
This commit is contained in:
parent
f8571ec5d5
commit
801b53857f
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ function($rootScope, User, $http, Content, Notification) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Payments.checkGemAmount = function(data) {
|
Payments.checkGemAmount = function(data) {
|
||||||
if (data.gift.type === "gems" && (!data.gift.gems.amount || data.gift.gems.amount === 0)) {
|
if (data && data.gift && data.gift.type === "gems" && (!data.gift.gems.amount || data.gift.gems.amount === 0)) {
|
||||||
Notification.error(window.env.t('badAmountOfGemsToPurchase'), true);
|
Notification.error(window.env.t('badAmountOfGemsToPurchase'), true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue