Skip to content

Commit

Permalink
fix: error in methods
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaam committed Jun 11, 2024
1 parent 2abf8e8 commit 6633cea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Vaccine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ Vaccine.prototype = Object.assign(Vaccine.prototype, Component.prototype, {
listVaccines() {
const vaccines = [];

this.groups.values().forEach((group) => {
Array.from(this.groups.values()).forEach((group) => {
const items = group.listItems();
vaccines.push(...items);
});

return vaccines;
},
openDrawer() {
Expand Down
3 changes: 2 additions & 1 deletion src/components/VaccineGroup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ VaccineGroup.prototype = Object.assign(
listItems() {
const items = [];

this.items.values().forEach((item) => {
Array.from(this.items.values()).forEach((item) => {
items.push({
id: item.id,
title: item.getTitle(),
veterinary: item.getVeterinary(),
date: item.getDate(),
});
});

return items;
},
},
Expand Down

0 comments on commit 6633cea

Please sign in to comment.