mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
ref issue #11794 - Add error check in _addlNotes field.
This commit is contained in:
@@ -272,9 +272,9 @@ each(premium, (pot, key) => {
|
|||||||
notes: t('hatchingPotionNotes', {
|
notes: t('hatchingPotionNotes', {
|
||||||
potText: pot.text,
|
potText: pot.text,
|
||||||
}),
|
}),
|
||||||
_addlNotes: t('eventAvailability', {
|
_addlNotes: pot._season ? t('eventAvailability', {
|
||||||
date: t(`dateEnd${pot._season}`),
|
date: t(`dateEnd${pot._season}`),
|
||||||
}),
|
}) : null,
|
||||||
premium: true,
|
premium: true,
|
||||||
limited: false,
|
limited: false,
|
||||||
canBuy () {
|
canBuy () {
|
||||||
@@ -290,9 +290,9 @@ each(wacky, (pot, key) => {
|
|||||||
notes: t('hatchingPotionNotes', {
|
notes: t('hatchingPotionNotes', {
|
||||||
potText: pot.text,
|
potText: pot.text,
|
||||||
}),
|
}),
|
||||||
_addlNotes: t('eventAvailability', {
|
_addlNotes: pot._seasont && pot._season !== '_PENDING_' ? ('eventAvailability', {
|
||||||
date: t(`dateEnd${pot._season}`),
|
date: t(`dateEnd${pot._season}`),
|
||||||
}),
|
}) : null,
|
||||||
premium: false,
|
premium: false,
|
||||||
limited: true,
|
limited: true,
|
||||||
wacky: true,
|
wacky: true,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
itemInfo = {
|
itemInfo = {
|
||||||
key: item.key,
|
key: item.key,
|
||||||
text: i18n.t('potion', { potionType: item.text(language) }),
|
text: i18n.t('potion', { potionType: item.text(language) }),
|
||||||
notes: item.notes(language),
|
notes: item._addlNotes ? item.notes(language) : null,
|
||||||
class: `Pet_HatchingPotion_${item.key}`,
|
class: `Pet_HatchingPotion_${item.key}`,
|
||||||
value: item.value,
|
value: item.value,
|
||||||
locked: false,
|
locked: false,
|
||||||
@@ -86,7 +86,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
itemInfo = {
|
itemInfo = {
|
||||||
key: item.key,
|
key: item.key,
|
||||||
text: i18n.t('potion', { potionType: item.text(language) }),
|
text: i18n.t('potion', { potionType: item.text(language) }),
|
||||||
notes: `${item.notes(language)} ${item._addlNotes(language)}`,
|
notes: item._addlNotes ? `${item.notes(language)} ${item._addlNotes(language)}` : null,
|
||||||
class: `Pet_HatchingPotion_${item.key}`,
|
class: `Pet_HatchingPotion_${item.key}`,
|
||||||
value: item.value,
|
value: item.value,
|
||||||
locked: false,
|
locked: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user