Skip to content

Commit

Permalink
Merge pull request #53 from the-hideout/fix-getTasksProvidingItem
Browse files Browse the repository at this point in the history
item -> items
  • Loading branch information
GrantBirki authored Jun 18, 2022
2 parents e41bc0f + e5c11bc commit 437aa82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datasources/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TasksAPI extends WorkerKV {
async getTasksProvidingItem(itemId) {
await this.init();
const tasks = this.cache.data.filter(rawTask => {
for (const reward of rawTask.startRewards.item) {
for (const reward of rawTask.startRewards.items) {
if (reward.item === itemId) {
return true
}
Expand All @@ -88,7 +88,7 @@ class TasksAPI extends WorkerKV {
}
}
}
for (const reward of rawTask.finishRewards.item) {
for (const reward of rawTask.finishRewards.items) {
if (reward.item === itemId) {
return true;
}
Expand Down

0 comments on commit 437aa82

Please sign in to comment.