mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
add tests for fns/ultimateGear, fns/handleTwoHanded, fns/randomVal, fns/predictableRandom and partial tests for ops/buy
This commit is contained in:
@@ -102,7 +102,7 @@ module.exports = function buy (user, req = {}, analytics) {
|
||||
} else {
|
||||
if (user.preferences.autoEquip) {
|
||||
user.items.gear.equipped[item.type] = item.key;
|
||||
message = handleTwoHanded(user, item, null, req);
|
||||
message = handleTwoHanded(user, item, undefined, req);
|
||||
}
|
||||
user.items.gear.owned[item.key] = true;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ module.exports = function buyMysterySet (user, req = {}, analytics) {
|
||||
throw new NotFound(i18n.t('mysterySetNotFound', req.language));
|
||||
}
|
||||
|
||||
if (window && window.confirm) { // TODO move to client
|
||||
if (typeof window !== 'undefined' && window.confirm) { // TODO move to client
|
||||
if (!window.confirm(i18n.t('hourglassBuyEquipSetConfirm'))) return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user