mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 04:37:36 +01:00
fix(subscriptions): handle future/prebuilt mystery items
This commit is contained in:
@@ -29,6 +29,7 @@ function _findMysteryItems (user, dateMoment) {
|
||||
_.each(shared.content.gear.flat, item => {
|
||||
if (
|
||||
item.klass === 'mystery'
|
||||
&& shared.content.mystery[item.mystery]
|
||||
&& dateMoment.isSameOrAfter(shared.content.mystery[item.mystery].start)
|
||||
&& dateMoment.isSameOrBefore(moment(shared.content.mystery[item.mystery].end).endOf('day'))
|
||||
&& !user.items.gear.owned[item.key]
|
||||
|
||||
Reference in New Issue
Block a user