mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fix purchasing wacky potions (#15276)
This commit is contained in:
@@ -97,7 +97,7 @@ export default async function purchase (user, req = {}, analytics) {
|
||||
|
||||
const { price, item } = getItemAndPrice(user, type, key, req);
|
||||
|
||||
if (type === 'hatchingPotions' && item.premium === true && item.questPotion !== true) {
|
||||
if (type === 'hatchingPotions' && (item.premium === true || item.wacky === true) && item.questPotion !== true) {
|
||||
const matchers = getScheduleMatchingGroup('premiumHatchingPotions');
|
||||
if (!matchers.match(item.key)) {
|
||||
throw new NotAuthorized(i18n.t('messageNotAvailable', req.language));
|
||||
|
||||
Reference in New Issue
Block a user