Skip to content

Commit

Permalink
Add new methods 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandros12345 committed Apr 21, 2024
1 parent 04d3c01 commit 2edf123
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/modules/bar/bar.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,20 @@ export class BarService {
(setting) => report.settingId === setting.id,
);

let answers;
if (report.answers) {
answers = report.answers
if (report) {
const answers = report.answers
.map((answer) => {
return setting.answers[answer];
})
.filter((answer) => {
return answer !== undefined;
});
}

reports.push({
title: setting.title,
answers: answers,
});
reports.push({
title: setting.title,
answers: answers,
});
}
}

return reports;
Expand Down

0 comments on commit 2edf123

Please sign in to comment.